Hi,
great module.
Would it be possible to protect the node for a certain user role.
Other users see nothing (except admin users and users granted access), but the particular user role sees the password question? And after giving the correct password that user role sees the node?

greetings, Martijn

Comments

AlexisWilke’s picture

Category: support » feature

If I understand properly, what you want to do is protect a node so only Role A and B can enter a password and then have a chance to see the content. All other roles (say C and D) would otherwise not be allowed to see anything. (of course, except UID 1).

If that's the case, you want to also install node_privacy_byrole.

This gives you the ability to protect a node based on roles. That means only those roles can access the node at all. All the others will get an Access Denied error (and the menu links will automatically disappear too!)

This being said, I guess that the permissions from protected_node could easily be extended to define access on a node type basis (like the edit) based on roles. Is that what you are thinking about?

Thank you.
Alexis

summit’s picture

Hi,
Thanks for your quick reply!
I want to give users a password, and users with that password can see the node.
(the node will have information prepared for only them and they need to enter their given password to see it).
Other people should not be able to see the node, except users with admin role.
Is this clarifying enough?

Greetings, Martijn

AlexisWilke’s picture

Summit,

Yes. I was thinking to make use of both modules. One to protect so only a given role can use the node, and the other so the node is password locked too.

Now, I started adding a set of permissions "access protected <node-type>", but I have a problem in the protected_node_db_rewrite_sql() function. It makes it rather complicated. For now, using the other solution would probably work better for you (and it's ready now.)

Thank you.
Alexis

AlexisWilke’s picture

Status: Active » Closed (won't fix)

At this point, I will close this issue. It seems to me that the view and access permissions are enough for this very module. If necessary the node privacy by role (see #1) should suffice to add additional constrains.

Thank you.
Alexis