diff --git a/backend/core/src/main/java/org/opencdmp/data/converters/PlanBlueprintVersionStatusConverter.java b/backend/core/src/main/java/org/opencdmp/data/converters/enums/PlanBlueprintVersionStatusConverter.java similarity index 90% rename from backend/core/src/main/java/org/opencdmp/data/converters/PlanBlueprintVersionStatusConverter.java rename to backend/core/src/main/java/org/opencdmp/data/converters/enums/PlanBlueprintVersionStatusConverter.java index 1fe184fe8..6d07fde3d 100644 --- a/backend/core/src/main/java/org/opencdmp/data/converters/PlanBlueprintVersionStatusConverter.java +++ b/backend/core/src/main/java/org/opencdmp/data/converters/enums/PlanBlueprintVersionStatusConverter.java @@ -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; diff --git a/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java b/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java index 26ef46021..4c9603f31 100644 --- a/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java +++ b/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java @@ -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 { @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; } diff --git a/backend/web/src/main/resources/config/permissions.yml b/backend/web/src/main/resources/config/permissions.yml index 0b264b4d2..64e160fce 100644 --- a/backend/web/src/main/resources/config/permissions.yml +++ b/backend/web/src/main/resources/config/permissions.yml @@ -118,7 +118,10 @@ permissions: #PlanStatus BrowsePlanStatus: - roles: [ ] + roles: + - Admin + - TenantAdmin + - TenantConfigManager clients: [ ] allowAnonymous: false allowAuthenticated: false