Permissions - Alfresco Federation Services - 3.2 - 3.2 - Ready - Alfresco - external - Alfresco/Alfresco-Federation-Services/3.2/Alfresco-Federation-Services/Configure/Connectors/Google-Drive-JWT-Connector/Permissions - 2025-03-04

Alfresco Federation Services

Platform
Alfresco
Product
Alfresco Federation Services
Release
3.2
License

If the permission list is set on a document by the repository connection, Drive will attempt to set these permissions. It expects these permissions in the form principal=permissions. The principal must be an email address, and the allowed values for permissions are as follows:

Available for files:

  • owner
  • writer
  • commenter
  • reader

To manipulate this list, use a JavaScript task. For more information on the ACL document field and the JavaScript task.

Here is an example of mapping permissions from Box to Google Drive

if (rd.getACL() != null) {  
var newAcl = [];  
for (var i in rd.getACL()) {  
var acl = rd.getACL()[i];  
var split = acl.split('=');  
var nRole = ''  
if (split[0] != 'AutomationUser_AAAAAAAAAA@boxdevedition.com') {//This is the service user for Box, so we'll skip it  
if (split[1] === 'editor') {  
nRole = 'writer';  
} elseif (split[1] === 'owner') {  
nRole = 'owner';  
} elseif (split[1] === 'previewer') {  
nRole = 'reader';  
} elseif (split[1] === 'uploader') {  
nRole = 'writer';  
} elseif (split[1] === 'previewer uploader') {  
nRole = 'reader';  
} elseif (split[1] === 'viewer uploader') {  
nRole = 'reader';  
} elseif (split[1] === 'co_owner') {  
nRole = 'writer';  
} else {  
nRole = 'reader';  
}  
newAcl.push(split[0] + '=' + nRole);  
}  
}  
rd.setACL(newAcl);  
}