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.data.converters.enums.DatabaseEnumConverter;

View File

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

View File

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