Workflow:

- Ensure group support is available to all users (i.e. fix up all permission errors)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4927 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2007-01-25 15:44:08 +00:00
parent 32c25405f5
commit eab5595836
10 changed files with 151 additions and 54 deletions

View File

@@ -105,4 +105,13 @@ public interface AuthorityDAO
* @return
*/
NodeRef getAuthorityNodeRefOrNull(String name);
/**
* Gets the name for the given authority node
*
* @param authorityRef authority node
* @return name
*/
public String getAuthorityName(NodeRef authorityRef);
}

View File

@@ -495,4 +495,22 @@ public class AuthorityDAOImpl implements AuthorityDAO
return getAuthorityOrNull(name);
}
public String getAuthorityName(NodeRef authorityRef)
{
String name = null;
if (nodeService.exists(authorityRef))
{
QName type = nodeService.getType(authorityRef);
if (type.equals(ContentModel.TYPE_AUTHORITY_CONTAINER))
{
name = (String)nodeService.getProperty(authorityRef, ContentModel.PROP_AUTHORITY_NAME);
}
else if (type.equals(ContentModel.TYPE_AUTHORITY))
{
name = (String)nodeService.getProperty(authorityRef, ContentModel.PROP_USER_USERNAME);
}
}
return name;
}
}