Hi !

when a new role is added, all existing nodes cannot have permissions saved for this role.
For example : create a node N, set some permission on it. Add a new role. Edit the node, and assign "edit" and "view" to the new role. Save it and re-edit it : the new permissions have not been saved...

This patch corrects this (patch against 5.x-1.x-dev)

Alex :)

Comments

jondoesdrupal’s picture

Assigned: alex_ost » jondoesdrupal

Great stuff, thanks for the patch. I'll apply it and get it commited when I get home tonight.

Cheers,

Jon

alex_ost’s picture

StatusFileSize
new2.86 KB

Well, glad that you didn't commit it, it's not quite complete :)
Here is another patch which includes the preceding one and adds some more : when editing a node (with a new role added), it fills up permissions for the new role with default permissions, instead of just denying everything.

BTW : node_privacy_byrole is a really great module, seems to me mandatory for any drupal site. Why isn't it included in core ???

Alex :)

alex_ost’s picture

StatusFileSize
new3.25 KB

Sorry, wrong version... :/

jondoesdrupal’s picture

I feel the same way, I only came across this module a month or two ago and it's the exact simple access control I've always wanted. There hasn't been much development activity on it though which is no doubt why it's not had bigger uptake but hopefully now we'll get a bug free 5.x release and that'll raise it's profile.

I've not had a play with 6.x yet, but it'd probably be good to try and produce a release for that too.

Anyway, thanks for the second patch, I'll get it in place tonight.

Cheers,

Jon

jondoesdrupal’s picture

Status: Needs review » Closed (fixed)

Thanks Alex, patch has been committed and should be published in the dev release later on today.

jondoesdrupal’s picture

Only committed this to head, forgot the 5-x branch, so will fix this tonight.