Bug 12740: Allow root admins to bypass the ACL layer.

Reviewed-By: Kishan
This commit is contained in:
Nitin Mehta 2012-01-24 12:28:23 +05:30
parent 9d575939fe
commit 93c411eb59
1 changed files with 3 additions and 3 deletions

View File

@ -810,10 +810,10 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
public void checkAccess(Account caller, AccessType accessType, ControlledEntity... entities) {
HashMap<Long, List<ControlledEntity>> domains = new HashMap<Long, List<ControlledEntity>>();
if (caller.getId() == Account.ACCOUNT_ID_SYSTEM) {
//no need to make permission checks if the system makes the call
if (caller.getId() == Account.ACCOUNT_ID_SYSTEM || isRootAdmin(caller.getType())) {
//no need to make permission checks if the system/root admin makes the call
if (s_logger.isTraceEnabled()) {
s_logger.trace("No need to make permission check for System account, returning true");
s_logger.trace("No need to make permission check for System/RootAdmin account, returning true");
}
return;
}