--- activitystream.module (saved version)
+++ (current document)
@@ -47,6 +47,13 @@
   return TRUE;
 }
 
+/**
+ * Implementation of hook_perm().
+ */
+function activitystream_perm() {
+  return array('edit own stream items', 'edit any stream item', 'delete own stream items', 'delete any stream item');
+}
+
 function activitystream_menu() {
   $items = array();
 
@@ -84,6 +91,28 @@
 }
 
 /**
+ * Implementation of hook_access().
+ *
+ * Define four different access controls. "edit/delete own content" and 
+ * "edit/delete any content"
+ */
+function activitystream_access($op, $node, $account) {
+  if ($op == 'update') {
+    if (user_access('edit own stream items', $account) && ($account->uid == $node->uid)) {
+      return TRUE;
+    }
+    return user_access('edit any stream item', $account);
+  }
+
+  if ($op == 'delete') {
+    if (user_access('delete own stream items', $account) && ($account->uid == $node->uid)) {
+      return TRUE;
+    }
+    return user_access('delete any stream item', $account);
+  }
+}
+
+/**
  * Implementation of hook_nodeapi(). 
  * When a node is deleted, also delete the associated record in the stream table.
  */
