mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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();
|
Long networkOfferingId = cmd.getNetworkOfferingId();
|
||||||
|
|
||||||
// 1) default is system to false if not specified
|
// 1) default is system to false if not specified
|
||||||
// 2) reset parameter to false if it's specified by the regular user
|
// 2) reset parameter to false if it's specified by a non-ROOT user
|
||||||
if ((isSystem == null || _accountMgr.isNormalUser(caller.getId())) && id == null) {
|
if (isSystem == null || !_accountMgr.isRootAdmin(caller.getId())) {
|
||||||
isSystem = false;
|
isSystem = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user