By NeilMcEvoy on
Hi there
I've just started using Node Privacy by Role, and seem to have some basic difficulties getting it to work. I'm initially using it in conjunction with Organic Groups, on the basis that some groups are intended for 'Executive' level roles within the site. Only Executives should be able to see and then use the group.
So, I've set a group to have view access only for the Executive level role, however at the moment any other role can still see the group. What am I missing?
Many thanks in advance,
Neil.
Comments
Not just groups
Even a blog item, marked to be seen only by Executive roles, can still be seen by any other, including anonymous, so I guess I'm missing something very basic.
N.
Conflict in the permissions system
Neil, the two modules you're using define their own node access permissions - but Drupal does not currently handle more than one module at a time doing this.
There is a warning about this issue in OG's readme file.
Quote:
"Drupal has poor support for running more than one node_access type module at one. That means that you can't run og with
taxonomy_access, nodeperm_by_role, nodeaccess, or any other node access control module. This is a core Drupal issue, not an og issue. Developers - feel free to propose a solution for this. See http://drupal.org/node/23193"
You will have to choose one module for setting granular access permissions.
OG permissions?
Thanks Vanveen. What node access permissions does OG use, is it the simple fact you can set a blog to be private within a group or public?
Do you know if there is a way to make a group wholly private, so you can't see content unless a member? That's all I'm after really.
Many thanks, Neil.
Sure
Controlling node access is, in my opinion, the main point of OG module. I'm using OG for Drupal 4.7, but I suppose it's the same for 4.6
If you go to administer > settings > og, you will find a button to enable access control, and below that the following options:
Visibility of posts:
- Visible only within the targeted groups
- Visible within the targeted groups and on other pages
- Visibility to be determined by the author/editor using a checkbox on the posting form
If you check the first one, any post in the associated content types can be made private. Moreover, you can also require all posts to be affiliated with a group.
(With such a configuration, you would end up with a site without public contents - all users should be member of at least one group to see something.)
I hope this is useful for you...
Ahhh
Ah yes I understand it now, yes that is very useful thankyou very much.
It has that slight quirk of showing the message 'No posts in this group' if you don't have access, which is what confuses things quite a bit. Apart from that it is a very elegant way of working it, I like it! Thanks again.
Neil.