Closed (won't fix)
Project:
Protected Node
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2011 at 22:43 UTC
Updated:
4 Jun 2011 at 22:14 UTC
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
Comment #1
AlexisWilke commentedIf 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
Comment #2
summit commentedHi,
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
Comment #3
AlexisWilke commentedSummit,
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
Comment #4
AlexisWilke commentedAt 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