I have some questions about JonBob's node_permissions modules (http://cvs.drupal.org/viewcvs/contributions/sandbox/jonbob/node_permissi...).

First of all, how do I use them? Am I supposed to use nodeperm_role.module and nodeperm_taxonomy.module together? The nodeperm_taxonomy settings let you choose a vocabulary. What do I do after choosing one? Are new menus supposed to show up somewhere? I see that enabling nodeperm_role adds the "viewable by" and "editable by" menus, but I don't see anything from nodeperm_taxonomy. I understand the hierarchy example mentioned inside the module file, but I don't know how to set it up.

Second question I've posted separately: http://drupal.org/node/11240

Lastly, after I start using those modules, is there a way to not use them anymore? I guess simply disabling the modules doesn't revert things to the way they were. (At least not on my site...)

Comments

AlanChandler’s picture

Or at least I am using nodeperm_taxonomy to provide an ability to allow users to specify which posts can be seen by anonymous and which not.

In order to get it to work, I have had to do several things.

1) In the node_access table there is a record for realm "all". Remove it - since it provides a bypass to all the permission stuff
2) Create a taxonomy with a name like "Access Rights" and with some terms in a hierarchy. I created two

Everyone
- Family Member

With family member being one level down from Everyone.

Make this a required taxonomy for every node;

3) Find the "tid" or id of the "Everyone term in term_data" and insert a record in the nodeperm_taxonomy table with uid=0 tid= value found and edit="0" (assuming Anonymous can not edit anything).

4) Go through every user and allocate them access rights (in my case most of them where "Family Member" view and edit.

I believe this should allow it to work. I have thought afterwards, but have never got around to checking, is that I could make "Access Rights" an optional taxonomy and then I would not have to do step 3.

Having now thought this through in detail, I am sure there is a better way to do it, and I plan on trying to write this up shortly

Danio’s picture

Thanks for the reply.

So when you create a node, or even just edit one, how do you set it to be viewable by Family Members only?

With nodeperm_roles disabled, my members get that "Welcome to your new Drupal-powered website" message. (I guess that's because no content has been set with any permissions.)

*** Edit: Okay... -_- I figured it out. I had to set the types for the permissions vocabulary. Duh... Hehheh.

AlanChandler’s picture

When there is no content that an anonymous user can view, he gets to see the "Welcome to the new web site message" - not really what you want.

I am not sure if you answered your own question... but when you create or edit a node you will have a drop down box with the need to select something from the "Access Rights" taxonomy.

There are two problems with this approach - one that bothers me and one that doesn't

a) The default setting for a node is "Everyone" when I would really like it to be the same as the person who is creating the content has

b) You give someone the taxonomy item of somewhere down the hierarchy and the module automatically works up to the top of the hierarchy and grants all rights upwards. Unfortunately with this scheme you can't have someone sit in two separate groups and have access to both groups at the same time.

I have given some thought to an alternative access control system which I have expressed here. This has the concept of default permissions to solve my first issue.

Danio’s picture

Actually the "Welcome to the new blah" message problem was just my site having no nodes assigned to any access permissions taxonomy. That's no problem now.

I still have the problem of my anonymous users being denied access to all content though.

marqpdx’s picture

Does this mod work in 4.5?
Thanks,
mark

killes@www.drop.org’s picture

I suppose it will once 4.5 is released. It still needs some work though.
--
If you have troubles with a particular contrib project, please consider to file a support request. Thanks.

lyk0s’s picture

Well I have a little bit of existing content in my 4.5.1 site.
I downloaded nodeperm_role.module and enabled it, but then I started to get...

warning: Cannot modify header information - headers already sent by (output started at /Web/WebFabric/hosts/cybertribe.com/modules/nodeperm_role.module:79) in /Web/WebFabric/hosts/cybertribe.com/includes/common.inc on line 155.

I'm using the stuf from jonBob's sandbox.

Also is there a way to set the ACLs on EXISTING content? (it seems all existing content has viewing and editing set for all roles.)