mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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);
|
||||
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user