[development] Proposed user_access / $user->roles hook

Ron Parker sysop at scbbs.com
Thu Mar 29 19:01:11 UTC 2007


Steven Jones wrote:

> Hi,
>
> I think the functionality that you're after could be covered by
> creative use of hook_node_grants, node_access_grants and your own user
> access system in OG user roles.
>
Here is where I bump into my Drupal ignorance.  I thought (and please 
excuse my misuse of terminology) node grants and node permissions were 
different.  By node grants I mean "grant_list", "grant_view", 
"grant_update", "grant_delete".  By node permissions, I  mean  
"create_node_content", "edit_node_content", "administer_module", etc...

Now, if it's possible to create a mechanism that adds the correct user 
access roles within OG, then it sounds like that's the way I should go.

> I myself have found much of the OG functionality lacking, and would be
> interested in helping to write these features if you wanted.
>
Yes, very interested. 

> Core modifications are really not needed, but would indeed save a lot 
> of work!
>
For example, on OG, this is the user_access check to determine whether 
to display a create content link:

    node_access('create', $type->type))

node_access, as you know, calls user_access.

Theoretically, you  are saying that it's possible to create a user 
access function in OG that would override or append to the Drupal core 
user access function?

-ron


More information about the development mailing list