Content Access should have an api.php file which holds the API for other modules contributors who which to use it.

Comments

vacilando’s picture

Subscribing.

Kolibri’s picture

Please tell me how i can grant a user update-rights for a single node (via user and node id)
I detected the changes in the acl, acl_node and node_access table.
But i don't understand the serialization(a:6:{s:4:"view";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}s:8:"view_own";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}s:6:"update";a:1:{i:0;i:3;}s:10:"update_own";a:1:{i:0;i:3;}s:6:"delete";a:1:{i:0;i:3;}s:10:"delete_own";a:1:{i:0;i:3;}})
in content_access.
I want to change the permission after editing a node, with node_presave. I tried to do it with rules, but the content-selector is unable to retrive the node-id, which i need.

Thanks a lot

jlockhart’s picture

Not sure if others are still looking for this but I was able to use form_alter to add my own submit function on the node form. In that function I used content_access_save_per_node_settings($node, $settings); content_access.module line 372. and content_access_get_per_node_settings($node); content_access.module line 404.. I'm using it to allow clients to make their photo gallery public or private. Hope that helps.

bradjones1’s picture

Status: Active » Needs review
StatusFileSize
new1.12 KB

See attached; note it includes some edits I've made to hook_user_acl() and other API functions related to rules implementation, here.

gisle’s picture

Issue summary: View changes

I intend to add this, but it should have more eyeballs on it. Please go ahead and review it.

  • bradjones1 authored 57bdbce4 on 7.x-1.x
    Issue #1145984 by bradjones1: Fixed API Documentation
    
gisle’s picture

Status: Needs review » Fixed

Commited to 7.x-1.x-dev

Status: Fixed » Closed (fixed)

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