on ne peut pas les modifier manuellement
ldap.synchronisation.import.group.clearAllChildren=false
// Add the permission corresponding to the Workflow "approbation".
// An admin have to set one of the 3 roles: "Chef de projet", "Qualiticien" or "Developpeur" on the root space of the project to the concerned users.
// Then this script will set the right permissions to the previous users in the different sub spaces(Drafts, Pending_Approval, Published…)
// Object user: reference the permission of the users in the current node
user = function (_info) {
var listInfo = _info.split(';');
this.access = listInfo[0];
this.name = listInfo[1];
this.permission = listInfo[2];
}
//Creation of an array of object user:
var listUser = new Array();
var newDecr = new String (space.getPermissions());
var tab = newDecr.split(',');
var size = tab.length
for each (i =0;i<size;i++) {
listUser.push (new user(tab[i]));
}
addPermission(space);
function addPermission(unEspace) {
var unEspacefils = unEspace.children;
for each (i in unEspacefils) {
var nom = i.name;
//In the space "Drafts":
//Users who have the role Chef de projet in the root space, receive the role Coordinator.
// " " Qualiticien " " " " Consumer.
// " " Developpeur " " " " Coordinator.
if (nom == "Drafts" ) {
var size=listUser.length;
for (var j=0; j< size; j++) {
if (listUser[j].permission == "Chef_de_projet") {
i.setPermission("Coordinator", listUser[j].name );
}
if (listUser[j].permission == "Quality") {
i.setPermission("Consumer", listUser[j].name );
}
if (listUser[j].permission == "Developper") {
i.setPermission("Coordinator", listUser[j].name );
}
i.save();
i.setInheritsPermissions(false);
i.save();
}
}
//In the space "Pending_approval":
//Users who have the role Chef de projet in the root space, receive the role Coordinator.
// " " Qualiticien " " " " Coordinator.
// " " Developpeur " " " " Chief.
if (nom == "Pending_Approval" ) {
var size=listUser.length;
for (var j=0; j< size; j++) {
if (listUser[j].permission == "Chef_de_projet") {
i.setPermission("Coordinator", listUser[j].name );
}
if (listUser[j].permission == "Quality") {
i.setPermission("Coordinator", listUser[j].name );
}
if (listUser[j].permission == "Developper") {
i.setPermission("Chief", listUser[j].name );
}
i.save();
}
}
//In the space "Published":
//Users who have the role Chef de projet in the root space, receive the role Coordinator.
// " " Qualiticien " " " " Exec.
// " " Developpeur " " " " Consumer.
if (nom == "Published") {
var size=listUser.length;
for (var j=0; j< size; j++) {
if (listUser[j].permission == "Chef_de_projet") {
i.setPermission("Coordinator", listUser[j].name );
}
if (listUser[j].permission == "Quality") {
i.setPermission("Exec", listUser[j].name );
}
if (listUser[j].permission == "Developper") {
i.setPermission("Consumer", listUser[j].name );
}
i.save();
i.setInheritsPermissions(false);
i.save();
}
}
//In the space "Archives":
//Users who have the role Chef de projet in the root space, receive the role Coordinator.
// " " Qualiticien " " " " Consumer.
// " " Developpeur " " " " Consumer.
if (nom == "Archives") {
var size=listUser.length;
for (var j=0; j< size; j++) {
if (listUser[j].permission == "Chef_de_projet") {
i.setPermission("Coordinator", listUser[j].name );
}
if (listUser[j].permission == "Quality") {
i.setPermission("Consumer", listUser[j].name );
}
if (listUser[j].permission == "Developper") {
i.setPermission("Consumer", listUser[j].name );
}
i.save();
i.setInheritsPermissions(false);
i.save();
}
}
//In the space "Trash":
//Users who have the role Chef de projet in the root space, receive the role Trash.
// " " Qualiticien " " " " Trash.
// " " Developpeur " " " " Trash.
if (nom == "Trash") {
var size=listUser.length;
for (var j=0; j< size; j++) {
if (listUser[j].permission == "Chef_de_projet") {
i.setPermission("Trash", listUser[j].name );
}
if (listUser[j].permission == "Quality") {
i.setPermission("Trash", listUser[j].name );
}
if (listUser[j].permission == "Developper") {
i.setPermission("Trash", listUser[j].name );
}
i.save();
i.setInheritsPermissions(false);
i.save();
}
}
}
for each (z in unEspacefils) {
if (z != null) {
addPermission(z);
}
}
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.