mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3356: list shared networks available for projects when call is executed by the admin who is not a part of the project
This commit is contained in:
parent
cbfb4e3976
commit
f68a74eada
|
|
@ -1419,7 +1419,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
|
|||
}
|
||||
}
|
||||
|
||||
if (!_accountMgr.isAdmin(caller.getType()) || (!listAll && (projectId != null && projectId.longValue() != -1 && domainId == null))) {
|
||||
if (!_accountMgr.isAdmin(caller.getType()) || (projectId != null && projectId.longValue() != -1 && domainId == null)) {
|
||||
permittedAccounts.add(caller.getId());
|
||||
domainId = caller.getDomainId();
|
||||
}
|
||||
|
|
@ -1443,7 +1443,13 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
|
|||
ex.addProxyObject(project.getUuid(), "projectId");
|
||||
throw ex;
|
||||
}
|
||||
|
||||
//add project account
|
||||
permittedAccounts.add(project.getProjectAccountId());
|
||||
//add caller account (if admin)
|
||||
if (_accountMgr.isAdmin(caller.getType())) {
|
||||
permittedAccounts.add(caller.getId());
|
||||
}
|
||||
}
|
||||
skipProjectNetworks = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue