From 93c411eb59614d4ac486fb6cb02b0e0ce295e30f Mon Sep 17 00:00:00 2001 From: Nitin Mehta Date: Tue, 24 Jan 2012 12:28:23 +0530 Subject: [PATCH] Bug 12740: Allow root admins to bypass the ACL layer. Reviewed-By: Kishan --- server/src/com/cloud/user/AccountManagerImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java index 1e45303e824..4839e482c31 100755 --- a/server/src/com/cloud/user/AccountManagerImpl.java +++ b/server/src/com/cloud/user/AccountManagerImpl.java @@ -810,10 +810,10 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag public void checkAccess(Account caller, AccessType accessType, ControlledEntity... entities) { HashMap> domains = new HashMap>(); - 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; }