Add new metadata for document manage permission

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

Add new metadata for document manage permission


I have some questions about the document manage permission. I want to add new metadata(Date Permission). currently, I am stuck to storing the data because of this service rmService.setPermission(node, role, authority); not accept multiple parameters. Below is my code and  my reference Screenshot 2021-12-16 213455.png 

for (var i=0; i<permissions.length(); i++)
var p = permissions.getJSONObject(i);

// collect values for the permission setting
var role = p.getString("role");
var authority = p.getString("authority");

var date= p.getString("date");
var remove = false;
logger.system.out("node = " + node);
logger.system.out("role = " + role);
logger.system.out("authority = " + authority);
if (p.has("remove"))
remove = p.getBoolean("remove");

// apply or remove permission
if (remove)
rmService.deletePermission(node, role, authority,date);

rmService.setPermission(node, role, authority,date);




1 Reply
Alfresco Employee

Re: Add new metadata for document manage permission

Permissions in Alfresco are not supporting additional parameters.

Every permission on a node is defined by a role name and an authority (user, group) list.

Hyland Developer Evangelist