Tenant Service hooks for LockService, FileFolderService and other MT fixes (DbNodeService & AuthorityService)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6437 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-08-07 08:40:25 +00:00
parent e0f2b295af
commit 9ed7b186f0
6 changed files with 50 additions and 4 deletions

View File

@@ -104,7 +104,9 @@ public class AuthorityServiceImpl implements AuthorityService
public boolean hasAdminAuthority()
{
String currentUserName = authenticationComponent.getCurrentUserName();
return ((currentUserName != null) && adminUsers.contains(currentUserName));
// for MT, see note for getAuthoritiesForUser
return ((currentUserName != null) && (adminUsers.contains(currentUserName) || adminUsers.contains(tenantService.getBaseNameUser(currentUserName))));
}
/* (non-Javadoc)
@@ -117,7 +119,8 @@ public class AuthorityServiceImpl implements AuthorityService
{
canonicalName = authorityName;
}
return adminUsers.contains(canonicalName);
// for MT, see note for getAuthoritiesForUser
return (adminUsers.contains(canonicalName) || adminUsers.contains(tenantService.getBaseNameUser(canonicalName)));
}
// IOC