mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02: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) {
|
if (type != null) {
|
||||||
sc.addAnd("guestType", SearchCriteria.Op.EQ, type);
|
sc.addAnd("guestType", SearchCriteria.Op.EQ, type);
|
||||||
}
|
}
|
||||||
|
if (account.getType() != Account.ACCOUNT_TYPE_ADMIN || (accountName != null && domainId != null)) {
|
||||||
SearchCriteria<NetworkVO> ssc = _networksDao.createSearchCriteria();
|
sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
|
||||||
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);
|
|
||||||
|
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);
|
List<NetworkVO> networks = _networksDao.search(sc, searchFilter);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user