Add Privacy checkbox to node grant tab.

Would be a plus, to have the option to set a privacy checkbox when I want to set a node totally private and later when I reset the privacy option, all the permissions values will be return as default.

Comments

vlad.pavlovic’s picture

Status: Active » Fixed

As of #2037899: Expose operations as API, which is currently committed to dev (and will be 1.5), you should be able to implement a custom module to do this for you fairly simply.

So when the checkbox (or whatever) is activated, you would:
1) call nodeaccess_get_grants to retrieve the current grants for the node, save them somewhere.
2) call nodeaccess_delete_grants to delete all grants for the node

Later, when the checkbox is unchecked, you would simply retrieve the grants for 1 and call nodeaccess_set_grants to set them to what they were.

Hope this helps.

  • vlad.pavlovic committed 6d1724d on 7.x-1.x
    Issue #2327269: Remove underscore from nodeaccess_get_grants().
    
vlad.pavlovic’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Assigned: wences_sz » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.