Individual users have a seperate view and edit access permission.

Can we add this feature for roles as well?

Comments

tinny created an issue. See original summary.

tinny’s picture

Title: Seperate View and Update access per role » Seperate View and Edit access per role
rakesh.gectcr’s picture

@tinny can you please explain little more

tinny’s picture

When selecting a Role to access a page the module grants both 'view' AND 'update' permissions together.

Can we seperate this so that there is are two options: 1) Role can view node and 2) Role can edit node.

This is the same feature as the "Add users, who can view or update" option where you can select users to View with the OPTION to edit as well.

lpsolit’s picture

Congratulations rakesh for your great module! So easy to use! :)

I agree with tinny, it would be great if we could separate who can view pages, and who can also edit them. In my specific case, I have confidential pages and documents that I want to restrict to some roles only, but I don't want them to be able to edit them. Would you agree to implement this feature?

xem8vfdh’s picture

+1. This is a fantastic, simple, intuitive module. That being said, it would benefit greatly from being able to explicitly allow or not allow edit permissions by role. Basically, you could change the interface by getting rid of your "Roles" section, with the check box by each role, and replace that with a search box just like the one you have for users, but for roles. And next to that search box, just like you have for users, would be a check box for "Edit". We could search for a specific role in this new checkbox, then decide whether we want that role to have edit permissions (check the "Edit" checkbox if so) or not have edit permissions (leave the "Edit" checkbox unchecked).

While we are at it, it would also be awesome to add "Anonymous User" to the list of roles. Currently that is not an option, and I can't understand why. Our use case, which I think is a rather common one, is to have a page that is publicly viewable to everyone (Anonymous User), but only Editable by specific users or roles. So, if you implemented the changes described above, we could select "Anonymous User" from the new role search box, leave "Edit" unchecked for that role, then also enable our Editor, for which we would check the "Edit" check box.

See: https://www.drupal.org/node/2849297

xem8vfdh’s picture

I've submitted a patch for anonymous role/user handling here: https://www.drupal.org/node/2849297#comment-11919577

Will look into the how we can provide/prohibit explicit edit permissions for roles the same way we are for user.

see below

xem8vfdh’s picture

I've created a more robust, better patch. Please review and provide feedback. See: https://www.drupal.org/node/2849297#comment-11922102

safallia joseph’s picture

StatusFileSize
new13.43 KB

The attached patch provides separate settings for view and Edit. So that users can set different users and user roles for view and edit operations.

safallia joseph’s picture

Status: Active » Needs review
xem8vfdh’s picture

Status: Needs review » Active
StatusFileSize
new11.75 KB

For what it's worth, here is the patch that I created and linked in my comment a week ago, it does the same thing with the added benefit of supporting anonymous roles, using (IMO) more intuitive dropdowns instead of check boxes, and a little bit of code cleanup. Hopefully some developer will respond. I've seen them active on other issues recently, but not a peep here or on https://www.drupal.org/node/2849297.

At this point, I don't particularly care which patch is accepted, but it would be nice for one of the two the be reviewed and accepted, since this is crucial functionality that's lacking. If @Safallia Joseph's patch is the one to go through, we'd want to to add support for anonymous roles (which is a super quick fix), since that is also crucial functionality.

xem8vfdh’s picture

Status: Active » Needs review
xem8vfdh’s picture

Ive gotten an email response from @manojapare that they will be considering the patches. Hopefully we will see an update soon.

Prince John’s picture

Assigned: Unassigned » Prince John
Prince John’s picture

Assigned: Prince John » Unassigned