mirror of https://github.com/apache/cloudstack.git
bug 8584: enabling search by id for regular users and domain admins for service offerings
status 8584: resolved fixed
This commit is contained in:
parent
17f5d55459
commit
7c32b2da62
|
|
@ -1104,6 +1104,13 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
if(domainRecord != null)
|
||||
{
|
||||
while(true){
|
||||
if(id != null) {
|
||||
ServiceOfferingVO so = _offeringsDao.findById((Long)id);
|
||||
if(so != null)
|
||||
sol.add(so);
|
||||
return sol;
|
||||
}
|
||||
|
||||
SearchCriteria<ServiceOfferingVO> sc = _offeringsDao.createSearchCriteria();
|
||||
|
||||
if (keyword != null) {
|
||||
|
|
@ -1130,10 +1137,10 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
sc.addAnd("useLocalStorage", SearchCriteria.Op.EQ, offering.getUseLocalStorage());
|
||||
}
|
||||
|
||||
if (id != null) {
|
||||
includePublicOfferings = false;
|
||||
sc.addAnd("id", SearchCriteria.Op.EQ, id);
|
||||
}
|
||||
// if (id != null) {
|
||||
// includePublicOfferings = false;
|
||||
// sc.addAnd("id", SearchCriteria.Op.EQ, id);
|
||||
// }
|
||||
|
||||
if (name != null) {
|
||||
includePublicOfferings = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue