Simple access and Organic Groups integration

Plain text icon simple_access.patch.txt1.85 KB
Plain text icon og.patch.txt838 bytes
File na.tar10 KB

One of the biggest problems with the node_access system is that the you can only really use 1 node access module at a time. So if you want to use simple_access and organic groups together, the access is not really going to work very well. In fact it is totally useless.

Their is the great node_arbitrator module which will allow modules to do this, but you need to use a new hook, that both simple access and og do not support, but both intend to support in the future. (I know that when I get a bit of time I will put it into simple access)

I have been doing some investigation as of late for 3 of my clients to get these working together, and I discovered the real problem with getting multiple node access modules to work together, which is the main thing that node arbitrator solves.

All the modules will if they do not set any access rights of there own, they will set the public access right. So which you create a node with do not assign any access with simple access, it will give the node public access. The same is true for groups in that if you do not assign the node to a group, it will give out public access.

Put these together and if you assign access in simple access and not in groups, groups will give out public access. The same is true the other way around. So if you don't access in both, then no matter what public will be assigned.

So I have put together a couple of patches for simple access or organic groups which stop them from writing out public (except in the case of groups where the user can set that it is public) and a new little module which will assign public access if no other access has been assigned. See below for the patches and module.

I am hoping that in the next version of Drupal, both simple access and organic groups will support node_arbitrator.

I have created a patch in the past which does 1 implementation of this, but is not as simplist as I have done here. See for more information.

my projects: