mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed problem with displaying direct network dedicated to non-admin accounts.
This commit is contained in:
parent
7a66300fc9
commit
18d4c97b55
@ -1552,13 +1552,17 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
if (type != null) {
|
||||
sc.addAnd("guestType", SearchCriteria.Op.EQ, type);
|
||||
}
|
||||
|
||||
SearchCriteria<NetworkVO> ssc = _networksDao.createSearchCriteria();
|
||||
ssc.addOr("accountId", SearchCriteria.Op.EQ, accountId);
|
||||
if (accountName == null && domainId == null) {
|
||||
ssc.addOr("accountId", SearchCriteria.Op.EQ, 1L);
|
||||
if (account.getType() != Account.ACCOUNT_TYPE_ADMIN || (accountName != null && domainId != null)) {
|
||||
sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
|
||||
}
|
||||
sc.addAnd("accountId", SearchCriteria.Op.SC, ssc);
|
||||
|
||||
SearchCriteria<NetworkVO> ssc = _networksDao.createSearchCriteria();
|
||||
/* ssc.addOr("accountId", SearchCriteria.Op.EQ, accountId);
|
||||
if (accountName == null && domainId == null) {
|
||||
ssc.addOr("accountId", SearchCriteria.Op.EQ, 1L);
|
||||
}
|
||||
sc.addAnd("accountId", SearchCriteria.Op.SC, ssc);
|
||||
}*/
|
||||
|
||||
List<NetworkVO> networks = _networksDao.search(sc, searchFilter);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user