Making handbook editable by all (was Re: [documentation] the documentation site...<snip>)

Charlie Lowe cel4145 at cyberdash.com
Thu Jan 12 15:22:07 UTC 2006


Ignore the rest. I'm clueless today :)

Meanwhile, I wonder what's up with the mailing lists??? Messages stopped 
coming through hours ago.

Charlie Lowe wrote:
> 
> This can be accomplished by adding in an "edit all book pages" access 
> control. It is different from the "maintain book pages" access control 
> because it does not provide them with access to the various 
> administrative options such as authoring information and publishing 
> options. Here is the code for implementing hook_access for the 4.6 
> module I created for doing wikipages:
> 
> /**
>  * Implementation of hook_access().
>  */
> function wikipage_access($op, $node) {
>   global $user;
> 
>   if ($op == 'create') {
>     return user_access('create wikipages');
>   }
> 
>   if ($op == 'update' || $op == 'delete') {
>     if (user_access('edit own wikipages') && ($user->uid == $node->uid)) {
>       return TRUE;
>     }
>     if (user_access('edit all wikipages')) {
>       return TRUE;
>     }
>   }
> }
> 


More information about the documentation mailing list