diff --git a/dmp-backend/core/src/main/java/eu/eudat/query/LockQuery.java b/dmp-backend/core/src/main/java/eu/eudat/query/LockQuery.java index e25127237..528879f6e 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/query/LockQuery.java +++ b/dmp-backend/core/src/main/java/eu/eudat/query/LockQuery.java @@ -2,6 +2,7 @@ package eu.eudat.query; import eu.eudat.authorization.AuthorizationFlags; import eu.eudat.commons.enums.LockTargetType; +import eu.eudat.convention.ConventionService; import eu.eudat.data.LockEntity; import eu.eudat.model.Lock; import gr.cite.tools.data.query.FieldResolver; @@ -35,6 +36,8 @@ public class LockQuery extends QueryBase { private EnumSet authorize = EnumSet.of(AuthorizationFlags.None); + private ConventionService conventionService; + public LockQuery like(String value) { this.like = value; return this; @@ -135,7 +138,8 @@ public class LockQuery extends QueryBase { return this; } - public LockQuery() { + public LockQuery(ConventionService conventionService) { + this.conventionService = conventionService; } @Override @@ -152,7 +156,12 @@ public class LockQuery extends QueryBase { protected Predicate applyFilters(QueryContext queryContext) { List predicates = new ArrayList<>(); if (this.like != null && !this.like.isEmpty()) { - predicates.add(queryContext.CriteriaBuilder.like(queryContext.Root.get(LockEntity._id), this.like)); + this.like = this.like.replaceAll("%", ""); + if (this.conventionService.isValidUUID(like)){ + CriteriaBuilder.In inClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(LockEntity._id)); + inClause.value(UUID.fromString(this.like)); + predicates.add(inClause); + } } if (this.ids != null) { CriteriaBuilder.In inClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(LockEntity._id)); diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html index b7c7ce634..b2a04c4f3 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html @@ -231,7 +231,7 @@
  • - {{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.COMMENT-FIELD' | translate}} + {{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.COMMENT-FIELD' | translate}} {{form.get('hasCommentField').getError('backendError').message}}
  • diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.html index 9ae6d4021..81cf0a434 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.html @@ -7,12 +7,12 @@
    • - + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
    • - + {{'GENERAL.VALIDATION.URL.LABEL' | translate}}
    • diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.html index efaaa6799..a11773afc 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.html @@ -119,7 +119,7 @@ {{usersMap.get(user?.get('userId')?.value)?.name}} {{enumUtils.toUserDescriptionTemplateRoleString(user?.get('role')?.value)}} - + @@ -141,7 +141,7 @@ --> {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS' | translate}} - + {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts index 58733617b..cdb7bbcbe 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts @@ -163,7 +163,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor { this.steps = this.stepper.steps; diff --git a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html index bc54d2b54..90bd7d6f8 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html @@ -15,7 +15,7 @@
    - diff --git a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts index 6b159b2d0..6e50e95b8 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts @@ -180,7 +180,7 @@ export class DmpBlueprintEditorComponent extends BaseEditor
    - +
    - - - - + + +
    @@ -116,7 +116,7 @@
    {{'DESCRIPTION-EDITOR.TOC.NEXT' | translate}}
    chevron_right - diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts b/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts index 26165db66..87fbf06f9 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts @@ -195,7 +195,7 @@ export class DescriptionEditorComponent extends BaseEditor . -
    +
    lock_outline {{'DESCRIPTION-OVERVIEW.LOCKED' | translate}}
    - . + .
    {{'DESCRIPTION-OVERVIEW.EDITED' | translate}} : {{description.updatedAt | dateTimeCultureFormatter: "d MMMM y"}}
    @@ -39,13 +39,13 @@
    - -
    @@ -92,7 +92,7 @@
    -
    +
    -
    diff --git a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.ts b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.ts index 713f16426..74a235736 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.ts +++ b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.ts @@ -198,7 +198,7 @@ export class DmpEditorComponent extends BaseEditor implemen } if (this.item.id != null) { - this.checkLock(this.item.id, LockTargetType.Dmp); + this.checkLock(this.item.id, LockTargetType.Dmp, 'DMP-EDITOR.LOCKED-DIALOG.TITLE', 'DMP-EDITOR.LOCKED-DIALOG.MESSAGE'); } } catch (error) { this.logger.error('Could not parse Dmp item: ' + data + error); diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html index e8b219fb6..2a7907b18 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.html @@ -16,13 +16,13 @@

    {{ enumUtils.toDmpUserRolesString(dmpService.getCurrentUserRolesInDmp(dmp?.dmpUsers)) }}

    - . + .
    public {{'DMP-OVERVIEW.PUBLIC' | translate}}
    - . -
    + . +
    lock_outline {{'DMP-OVERVIEW.LOCKED' | translate}}
    @@ -43,14 +43,14 @@
    - - -
    @@ -98,7 +98,7 @@ horizontal_rule
    -
    -
    +