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

Ron Parker sysop at scbbs.com
Thu Mar 29 18:28:57 UTC 2007

Peter Wolanin wrote:

> I think Gerhard's message caught the essential crux of this (i.e. it
> won't work).

But, it does work -- with the one exception involving node creation that 
is the crux of this message.  I currently work around this problem by 
using node_add directly instead of node/add/<node type>?gids[]=<group nid>.

>   However, I think there should be other ways to achieve
> your goals- it sounds like you are really trying to just require that
> nodes be in a group?

No.  I'm trying to require that a user have a specific role in a group 
that is specific to that group.  In another group, he might have the 
same role, or he might not.

>   Or maybe restricted to a group for some node
> types and not others?

Restricted to a group, yes, but for whatever node types are available to 
1) the group and 1b) the role the user has in the group.

> Maybe you just need some creative use of
> hook_form_alter and/or node validation?
It's possible.  That's what I'm trying to find out.  I do know that in 
order to achieve the functionality I was looking for, I only needed to 
modify user_access.  This worked for group node listing, viewing, 
updating and deleting.  Just not creating.

> I suggest that you make a post forum detailing exactly what you want
> to accomplish, and send to the list a short message with a link,
> rather than sending all the details to this list.
This was a re-post of an original message I posted to the list. The 
question was specific to this list. In the future, however, I will take 
your advice.  Thanks.

> -Peter


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070329/4b8ade15/attachment.htm 

More information about the development mailing list