Buenos días a tod@s,
Quiero que se añada automáticamente usuario: "admin" y estado: "administrador" a los miembros del sitio, cuando un usuario (que no sea administrador) haya creado un nuevo sitio, para que el usuario "admin" se pueda ver y tocar cualquier sitio.
Es añadir el usuario “admin” con permisos de “administrador” a cualquier sitio que se cree.
¿¿lo entendéis??
Estaba investigando pero no funciona, no sé cuál es el código del alfresco 4.2.f
Se corresponde con el archivo “colleagues.get.js”, no?
function main() { // Call the repo for the site memberships var maxItems = getMaxItems(), size = maxItems +1, json = remote.call("/api/sites/"+ page.url.templateArgs.site+"/memberships?size="+ size +"&authorityType=USER"); var memberships =[], totalResults =0; if(json.status==200) { // Create javascript objects from the repo response var obj = eval('('+ json +')'); if(obj) { totalResults = obj.length; memberships = obj.slice(0, maxItems); var member, userStatus; for(var i =0, j = memberships.length; i < j; i++) { member = memberships[i]; userStatus = member.authority.userStatus; } memberships.sort(sortByName); } }
Un Saludo,