plan status fixes

This commit is contained in:
CITE\spapacharalampous 2024-08-22 10:10:05 +03:00
parent f8c780970f
commit b336a4f7d9
3 changed files with 15 additions and 15 deletions

View File

@ -1,4 +1,4 @@
package org.opencdmp.data.converters; package org.opencdmp.data.converters.enums;
import org.opencdmp.commons.enums.PlanBlueprintVersionStatus; import org.opencdmp.commons.enums.PlanBlueprintVersionStatus;
import org.opencdmp.data.converters.enums.DatabaseEnumConverter; import org.opencdmp.data.converters.enums.DatabaseEnumConverter;

View File

@ -1,6 +1,5 @@
package org.opencdmp.query; package org.opencdmp.query;
import gr.cite.commons.web.authz.service.AuthorizationService;
import gr.cite.tools.data.query.FieldResolver; import gr.cite.tools.data.query.FieldResolver;
import gr.cite.tools.data.query.QueryBase; import gr.cite.tools.data.query.QueryBase;
import gr.cite.tools.data.query.QueryContext; import gr.cite.tools.data.query.QueryContext;
@ -10,8 +9,6 @@ import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Predicate;
import org.opencdmp.authorization.AuthorizationFlags; import org.opencdmp.authorization.AuthorizationFlags;
import org.opencdmp.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import org.opencdmp.commons.scope.user.UserScope;
import org.opencdmp.data.PlanEntity;
import org.opencdmp.data.PlanStatusEntity; import org.opencdmp.data.PlanStatusEntity;
import org.opencdmp.data.TenantEntityManager; import org.opencdmp.data.TenantEntityManager;
import org.opencdmp.model.planstatus.PlanStatus; import org.opencdmp.model.planstatus.PlanStatus;
@ -185,25 +182,25 @@ public class PlanStatusQuery extends QueryBase<PlanStatusEntity> {
@Override @Override
protected String fieldNameOf(FieldResolver item) { protected String fieldNameOf(FieldResolver item) {
if (item.match(PlanStatus._id)) if (item.match(PlanStatus._id))
return PlanStatus._id; return PlanStatusEntity._id;
else if (item.match(PlanStatus._description)) else if (item.match(PlanStatus._description))
return PlanStatus._description; return PlanStatusEntity._description;
else if (item.match(PlanStatus._name)) else if (item.match(PlanStatus._name))
return PlanStatus._name; return PlanStatusEntity._name;
else if (item.match(PlanStatus._internalStatus)) else if (item.match(PlanStatus._internalStatus))
return PlanStatus._internalStatus; return PlanStatusEntity._internalStatus;
else if (item.match(PlanStatus._definition)) else if (item.match(PlanStatus._definition))
return PlanStatus._definition; return PlanStatusEntity._definition;
else if (item.prefix(PlanStatus._definition)) else if (item.prefix(PlanStatus._definition))
return PlanStatus._definition; return PlanStatusEntity._definition;
else if (item.match(PlanStatus._createdAt)) else if (item.match(PlanStatus._createdAt))
return PlanStatus._createdAt; return PlanStatusEntity._createdAt;
else if (item.match(PlanStatus._updatedAt)) else if (item.match(PlanStatus._updatedAt))
return PlanStatus._updatedAt; return PlanStatusEntity._updatedAt;
else if (item.match(PlanStatus._isActive)) else if (item.match(PlanStatus._isActive))
return PlanStatus._isActive; return PlanStatusEntity._isActive;
else if (item.match(PlanStatus._belongsToCurrentTenant)) else if (item.match(PlanStatus._belongsToCurrentTenant))
return PlanStatus._belongsToCurrentTenant; return PlanStatusEntity._tenantId;
else else
return null; return null;
} }

View File

@ -118,7 +118,10 @@ permissions:
#PlanStatus #PlanStatus
BrowsePlanStatus: BrowsePlanStatus:
roles: [ ] roles:
- Admin
- TenantAdmin
- TenantConfigManager
clients: [ ] clients: [ ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false