mirror of https://github.com/apache/cloudstack.git
server: fix non-root users are able to list system networks by id (#5729)
This commit is contained in:
parent
46fa7f473d
commit
a277e4e08c
|
|
@ -1617,8 +1617,8 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
|||
Long networkOfferingId = cmd.getNetworkOfferingId();
|
||||
|
||||
// 1) default is system to false if not specified
|
||||
// 2) reset parameter to false if it's specified by the regular user
|
||||
if ((isSystem == null || _accountMgr.isNormalUser(caller.getId())) && id == null) {
|
||||
// 2) reset parameter to false if it's specified by a non-ROOT user
|
||||
if (isSystem == null || !_accountMgr.isRootAdmin(caller.getId())) {
|
||||
isSystem = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue