cancel
Showing results for 
Search instead for 
Did you mean: 

Blank permission for group after API setPermission

staifresco
Champ in-the-making
Champ in-the-making
Hi everybody,

I have a little problem assigning group permission to a folder via Alfresco API on a script.


On my script I do something like that:

folders[0].setPermission('All', 'TEST_GROUP');

After that to check if the script has actually setted the right permission I print them on the log and I get the right result.

logger.log(folders[0].permissions);
ALLOWED;SAP_SERVICE;All,ALLOWED;TEST_GROUP;All,ALLOWED;GROUP_EVERYONE;All

As I can see the permission form my TEST_GROUP was setted correctly.

But than, when I go to check the permission from the share interface on my folder I see a white row for my test group as u can see on the attached PNG.

Does anyone know why or what could be the issue ?




2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator
It seems it is a bug of data webscript api
 
GET /alfresco/s/slingshot/doclib/permissions/{store_type}/{store_id}/{id}

You can create a jira issue at https://issues.alfresco.com/jira/secure/Dashboard.jspa

Hi kaynezhang,

sorry to get back to this so late, anyway there was not any issue.
You just need to use the keystring GROUP on the permission assignment so…

What I was doing with the setPermission

folders[0].setPermission('All', 'TEST_GROUP');

should have be changed to

folders[0].setPermission('All', 'GROUP_TEST_GROUP');

This worked for me.

Enrico