I've lost my way somewhere. I wanted to give a certain role permission to update all pages within a certain category, no matter who created them.

I have taxonomy_access for the category part... but it looked like I needed an 'edit all pages' permission first.

So I decided to try my very first patch...

--- page.module 2006-01-05 03:37:32.430836992 -0800
+++ /home/millere/patches/editpage.module       2006-01-05 03:38:25.901708184 -0800
@@ -38,7 +38,7 @@ function page_help($section) {
  * Implementation of hook_perm().
  */
 function page_perm() {
-  return array('create pages', 'edit own pages');
+  return array('create pages', 'edit own pages', 'edit all pages');
 }

 /**
@@ -59,6 +59,7 @@ function page_access($op, $node) {
   }

   if ($op == 'update' || $op == 'delete') {
+    if (user_access('edit all pages')) return TRUE;
     if (user_access('edit own pages') && ($user->uid == $node->uid)) {
       return TRUE;
     }

So, I do get the 'edit all pages' permission - but the results are not what I expected. The role I gave 'edit all pages' permission to is able to edit pages created by the super-user, but not pages created by other roles.

Been going around in circles, not sure what I've missed.

Thanks...

Comments

Thn’s picture

No, it's not related to who created it. Some pages created by the super-user are still off limits as well. I can't tell what is making the difference.

Thn’s picture

It was and input formats problem - I hadn't given that role permission for the necessary input formats.