mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
Summary: allow admin user to do whatever he wants
Reported-by: Ryan Dietrich <ryan@betterservers.com> Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1359588792 -0700
This commit is contained in:
parent
e430b7aedd
commit
437d30a295
@ -954,7 +954,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
||||
if (network.getGuestType() != Network.GuestType.Shared) {
|
||||
// Check account permissions
|
||||
List<NetworkVO> networkMap = _networkDao.listBy(caller.getId(), network.getId());
|
||||
if (networkMap == null || networkMap.isEmpty()) {
|
||||
if ((networkMap == null || networkMap.isEmpty() ) && caller.getType() != Account.ACCOUNT_TYPE_ADMIN) {
|
||||
throw new PermissionDeniedException("Unable to modify a vm using network with id " + network.getId() + ", permission denied");
|
||||
}
|
||||
}
|
||||
@ -1031,7 +1031,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
||||
if (network.getGuestType() != Network.GuestType.Shared) {
|
||||
// Check account permissions
|
||||
List<NetworkVO> networkMap = _networkDao.listBy(caller.getId(), network.getId());
|
||||
if (networkMap == null || networkMap.isEmpty()) {
|
||||
if ((networkMap == null || networkMap.isEmpty() ) && caller.getType() != Account.ACCOUNT_TYPE_ADMIN) {
|
||||
throw new PermissionDeniedException("Unable to modify a vm using network with id " + network.getId() + ", permission denied");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user