Modify node users permissisons programatically

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Modify node users permissisons programatically

I'm working with ADF and I would like to change a Node permisions to disable heritage and set permisión to a especific group and user. In ADF there are various elements to allow the user to handle permisions. However I would like to make this programatically as i will set always same  permissions and y would like to make it automatically.

I have been taking a look to the PermisionService. But i haven't found a way to remove all permisions and se just the ones I like. Does anybody has or knows where i can find a sample code for setting programatically the permissions of a node.

thanks!!