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.
<model name="usr:usermodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <description>Alfresco User Model</description> <author>Alfresco</author> <published>2005-08-16</published> <version>0.1</version> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/> </imports> <namespaces> <namespace uri="http://www.alfresco.org/model/user/1.0" prefix="usr"/> </namespaces> <constraints> <constraint name="usr:userNameConstraint" type="org.alfresco.repo.dictionary.constraint.UserNameConstraint" /> <constraint name="usr:authorityNameConstraint" type="org.alfresco.repo.dictionary.constraint.AuthorityNameConstraint" /> </constraints> <types> <type name="usr:authority"> <title>Alfresco Authority Abstract Type</title> <parent>sys:base</parent> </type> <type name="usr:user"> <title>Alfresco User Type</title> <parent>usr:authority</parent> <properties> <!– The tokenisation set here is ignored - it is fixed for this type –> <!– This is so you can not break person lookup –> <property name="usr:username"> <type>d:text</type> <constraints> <constraint ref="usr:userNameConstraint" /> </constraints> </property> <property name="usr:password"> <type>d:text</type> </property> <property name="usr:enabled"> <type>d:boolean</type> </property> <property name="usr:accountExpires"> <type>d:boolean</type> </property> <property name="usr:accountExpiryDate"> <type>d:datetime</type> </property> <property name="usr:credentialsExpire"> <type>d:boolean</type> </property> <property name="usr:credentialsExpiryDate"> <type>d:datetime</type> </property> <property name="usr:accountLocked"> <type>d:boolean</type> </property> <property name="usr:salt"> <type>d:text</type> </property> </properties> </type> <type name="usr:authorityContainer"> <title>Alfresco Authority Type</title> <parent>usr:authority</parent> <properties> <!– The tokenisation set here is ignored - it is fixed for this type –> <!– This is so you can not break group lookup –> <property name="usr:authorityName"> <type>d:text</type> <constraints> <constraint ref="usr:authorityNameConstraint" /> </constraints> </property> <property name="usr:members"> <type>d:text</type> <multiple>true</multiple> </property> </properties> <associations> <child-association name="usr:member"> <source> <mandatory>false</mandatory> <many>true</many> </source> <target> <class>usr:authority</class> <mandatory>false</mandatory> <many>true</many> </target> <duplicate>false</duplicate> </child-association> </associations> </type> </types> </model>
/* Get User Groups Webscript Javascript file */ var person = people.getPerson(args["name"]); model.groups = people.getContainerGroups(person); model.test = new Array(); var containerGroups = people.getContainerGroups(person); for(var i=0;i<containerGroups.length;i++){ model.test = containerGroups[i].getQnamePath(); } model.personName = person;
<img src="/alfresco/images/logo/AlfrescoLogo32.png" alt="Alfresco" style="padding-right: 10px;"/><span class="mainTitle">User Groups</span> <div style="margin-top: 10px;"> User ${personName.properties.userName} (${personName.properties.firstName} ${personName.properties.lastName}) is part of the groups: <ul> <#list groups as group> <li> ${group.qnamePath} </#list> </ul> </div>
I don't know of one in the UI.I definitely like a way to manage groups a user is a member of rather than having to go to each group one at a time and add the user.There is thishttp://wiki.alfresco.com/wiki/JavaScript_API#People_APIArray getContainerGroups(ScriptNode person) Gets the groups that contain the specified authority. which could be used in a template to create a custom view or something.