Least permissions and node_access

Events happening in the community are now at Drupal community events on www.drupal.org.
agentrickard's picture

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.

Comments

Woo Hoo

agentrickard's picture

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

Multisite

Group organizers

Group notifications

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