mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
server: Disable searching by instance name for customers (#4077)
Only admins should be able to search VM by instance name Customers should not see or serach VM's using the instance name (i-) Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com>
This commit is contained in:
parent
0795cd430b
commit
f4f238e18e
@ -993,7 +993,9 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
|
||||
SearchCriteria<UserVmJoinVO> ssc = _userVmJoinDao.createSearchCriteria();
|
||||
ssc.addOr("displayName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
|
||||
ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%");
|
||||
ssc.addOr("instanceName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
|
||||
if (isRootAdmin) {
|
||||
ssc.addOr("instanceName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
|
||||
}
|
||||
ssc.addOr("state", SearchCriteria.Op.EQ, keyword);
|
||||
sc.addAnd("displayName", SearchCriteria.Op.SC, ssc);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user