Least permissions and node_access

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by agentrickard on November 13, 2007 at 3:24pm

OK, so I'm working on integrating Domain Access with OG.

Problem is, the current node_access system uses OR based permissions. What I really need is the option to set AND based permissions. For example:

-- Current node_access rules

return TRUE IF (og == TRUE) OR (Domain Access == TRUE);

-- Desired rules

return TRUE IF (og == TRUE) AND (Domain Access == TRUE);

See http://drupal.org/node/191375 for a full discussion and some possible options.

To summarize, I'm thinking about rewriting the node_access function and adding a hook_access_logic() function to allow for this type of granularity.

There is also a related problem that node_access checks don't run if $node->status == 0 -- which is a problem for my use case.

Categories:

Comments

Woo Hoo

Posted by agentrickard on November 20, 2007 at 7:13pm

There is now a patch to test.

http://drupal.org/node/191375#comment-635244

Requires:

  • Two node access modules.
  • One of the modules must implement the new 'group' flag in hook_node_grants().
  • MySQL > 4.0

--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3

And a core patch

Posted by agentrickard on December 1, 2007 at 9:43pm

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /