Add new metadata for document manage permission

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

Add new metadata for document manage permission

Hi,

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

http://dev.alfresco.com/resource/AlfrescoOne/5.0/PublicAPI/org/alfresco/service/cmr/security/Permiss... 

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);

}
else
{
rmService.setPermission(node, role, authority,date);

}
}

 

 

1 Reply
angelborroy
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