As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
protected NodeRef getNodeRef(WebScriptRequest req) { // NOTE: This web script must be executed in a HTTP Servlet environment if (!(req instanceof WebScriptServletRequest)) { throw new WebScriptException("Content retrieval must be executed in HTTP Servlet environment"); } HttpServletRequest httpReq = ((WebScriptServletRequest)req).getHttpServletRequest(); // locate the root path String path = (String) httpReq.getParameter("path"); if(path == null) { path = "/images"; } if(path.startsWith("/")) { path = path.substring(1, path.length()); } // build a path elements list List<String> pathElements = new ArrayList<String>(); StringTokenizer tokenizer = new StringTokenizer(path, "/"); while(tokenizer.hasMoreTokens()) { String childName = (String) tokenizer.nextToken(); pathElements.add(childName); } // look up the child NodeRef nodeRef = null; try { NodeRef companyHomeRef = this.repository.getCompanyHome(); nodeRef = getFileFolderService().resolveNamePath(companyHomeRef, pathElements).getNodeRef(); } catch(FileNotFoundException fnfe) { throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, "Unable to locate path"); } if (nodeRef == null) { throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, "Unable to locate path"); } return nodeRef; }
java.util.Set findNodesByAssignedPermission(java.lang.String authority, java.lang.String permission, boolean allow, boolean includeContainingAuthorities, boolean exactPermissionMatch) Find all the nodes where the current user has explicitly been assigned the specified permission. java.util.Set findNodesByAssignedPermissionForCurrentUser(java.lang.String permission, boolean allow, boolean includeContainingAuthorities, boolean includeContainingPermissions) Find all the nodes where the current user has explicitly been assigned the specified permission.
<#list node.permissions as p> <tr><td> ${p} </td></tr> </#list>
<!– webscript que partiendo de el space CCC, nos da los spaces a los que tiene permiso (y nos indica qué permiso) un grupo determinado, pasado por parámetro –> <#macro dir node depth> <#if node.isContainer> <#if node.permissions?exists> <#list node.permissions as p> <#if p?contains(g)> <tr> <td align='left'>${p?split(";")[2]}</td> <td align='leftr'>${node.name}</td> <td>${node.displayPath?substring(25)}/${node.name}</td> </tr> </#if> </#list> <#else> <td> no tiene permisos</td> </#if> </tr> <#else> <b>El space <i>${folderName}</i> NO existe …</b> </#if> <#list node.children as child> <#if child.isContainer && node.children?size != 0> <@dir node=child depth=depth+1/> </#if> </#list> </#macro> <!– create a table and start traversing the space structure –> <html> <body> <#assign folderName="User Homes/CCC" /> <#assign node=folderName> <img src="${url.context}/images/logo/AlfrescoLogo32.png" alt="Alfresco" /> <#if args.group?exists> <#if grupo?exists> <#if companyhome.childByNamePath[folderName]?exists> <#assign folderObj=companyhome.childByNamePath[folderName]> <#assign g=grupo.properties["usr:authorityName"] +";"> <b>Spaces a los que puede acceder el grupo: </b> ${grupo.properties["usr:authorityName"]}<br> <br><br> <table border="1"> <tr><th>Permiso</th><th>Space</th><th>Ruta</th></tr> <@dir node=folderObj depth=0/> </table> </#if> <#else> <b>Spaces a los que puede acceder el grupo: </b> El grupo "${args.group}" no existe<br> </#if> </#if> </body> </html>