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.
var peeps = people.getMembers(people.getGroup("GROUP_EVERYONE"));
getUsers.get.js var query = "TYPE:\"{http://www.alfresco.org/model/content/1.0}person\""; if ((args.s) && (args.s != "")) { query += " AND ("; var terms = args.s.split(" "); for (i = 0; i < terms.length; i++) { term = terms[i]; query += "((@\\{http\\://www.alfresco.org/model/content/1.0\\}firstName:*" + term; query += "*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}lastName:*" + term; query += "*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}userName:" + term; query += "*)) "; // final space here is important as default OR separator } query += ")"; } model.searchResults = search.luceneSearch(query);
var query = "TYPE:\"{http://www.alfresco.org/model/content/1.0}person\""; model.searchResults = search.luceneSearch(query);
Hi,GROUP_EVERYONE is special type of Authority. You won't find this in the web client group management when you try to list all available groups . There is a sample webscript called getUsers to search for users. getUsers.get.js var query = "TYPE:\"{http://www.alfresco.org/model/content/1.0}person\""; if ((args.s) && (args.s != "")) { query += " AND ("; var terms = args.s.split(" "); for (i = 0; i < terms.length; i++) { term = terms[i]; query += "((@\\{http\\://www.alfresco.org/model/content/1.0\\}firstName:*" + term; query += "*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}lastName:*" + term; query += "*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}userName:" + term; query += "*)) "; // final space here is important as default OR separator } query += ")"; } model.searchResults = search.luceneSearch(query); For your purpose to get all users you could just do a lucene search for all nodes of type Person and manipulate the result as you like. var query = "TYPE:\"{http://www.alfresco.org/model/content/1.0}person\""; model.searchResults = search.luceneSearch(query); Regards,Shagul
var h = peeps[i].properties["cm:homeFolder"];
var h = search.findNode(peeps[i].properties["cm:homeFolder"]);
var query = "TYPE:\"{http://www.alfresco.org/model/content/1.0}person\""; model.searchResults = search.luceneSearch(query); if (model.searchResults== undefined) { status.code = 404; status.message = "No persons."; status.redirect = true; }
… <#list model.searchResults as result> ${result}<br> </#list> …
org.alfresco.service.cmr.repository.TemplateException - Error during processing of the template 'Expression model is undefined on line 28, column 8 in org/alfresco/my/folders.get.html.ftl.'. Please contact your system administrator.
<#list searchResults as result> ${result.name}<br> </#list>
500 Description: An error inside the HTTP server which prevented it from fulfilling the request. Message: Error during processing of the template 'Expression model is undefined on line 7, column 10 in org/alfresco/sample/listing.get.html.ftl.'. Please contact your system administrator. Exception: freemarker.core.InvalidReferenceException - Expression model is undefined on line 7, column 10 in org/alfresco/sample/listing.get.html.ftl. freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134) freemarker.core.Dot._getAsTemplateModel(Dot.java:78) freemarker.core.Expression.getAsTemplateModel(Expression.java:89) freemarker.core.IteratorBlock.accept(IteratorBlock.java:94) freemarker.core.Environment.visit(Environment.java:208) freemarker.core.MixedContent.accept(MixedContent.java:92) freemarker.core.Environment.visit(Environment.java:208) freemarker.core.Environment.process(Environment.java:188) freemarker.template.Template.process(Template.java:237) org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:201) org.alfresco.web.scripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:377) org.alfresco.web.scripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:280) org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:173) org.alfresco.repo.web.scripts.RepositoryContainer$1.execute(RepositoryContainer.java:309) org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:294) org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:209) org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:320) org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:264) org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:240) org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139) org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) org.alfresco.web.app.servlet.MTWebScriptAuthenticationFilter.doFilter(MTWebScriptAuthenticationFilter.java:102) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) org.alfresco.module.vti.VtiContextFilter.doFilter(VtiContextFilter.java:94) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) java.lang.Thread.run(Thread.java:595) Exception: org.alfresco.service.cmr.repository.TemplateException - Error during processing of the template 'Expression model is undefined on line 7, column 10 in org/alfresco/sample/listing.get.html.ftl.'. Please contact your system administrator. org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:205)
Message: Error during processing of the template 'Expression model is undefined on line 7, column 10 in org/alfresco/sample/listing.get.html.ftl.'. Please contact your system administrator.