Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ public class Settings {
public static final String METADATA_WORKFLOW_ENABLE = "metadata/workflow/enable";
public static final String METADATA_WORKFLOW_DRAFT_WHEN_IN_GROUP = "metadata/workflow/draftWhenInGroup";
public static final String METADATA_WORKFLOW_ALLOW_SUBMIT_APPROVE_INVALID_MD = "metadata/workflow/allowSubmitApproveInvalidMd";
public static final String METADATA_WORKFLOW_ALLOW_PUBLISH_INVALID_MD = "metadata/workflow/allowPublishInvalidMd";
public static final String METADATA_PUBLICATION_ALLOW_PUBLISH_INVALID_MD = "metadata/publication/allowPublishInvalidMd";
public static final String METADATA_WORKFLOW_ALLOW_PUBLISH_NON_APPROVED_MD = "metadata/workflow/allowPublishNonApprovedMd";
public static final String METADATA_WORKFLOW_AUTOMATIC_UNPUBLISH_INVALID_MD = "metadata/workflow/automaticUnpublishInvalidMd";
public static final String METADATA_WORKFLOW_FORCE_VALIDATION_ON_MD_SAVE = "metadata/workflow/forceValidationOnMdSave";
public static final String METADATA_PUBLICATION_AUTOMATIC_UNPUBLISH_INVALID_MD = "metadata/publication/automaticUnpublishInvalidMd";
public static final String METADATA_SAVE_FORCE_VALIDATION_ON_MD_SAVE = "metadata/save/forceValidationOnMdSave";
public static final String METADATA_LINK_EXCLUDEPATTERN = "metadata/link/excludedUrlPattern";
public static final String METADATA_IMPORT_RESTRICT = "metadata/import/restrict";
public static final String METADATA_IMPORT_USERPROFILE = "metadata/import/userprofile";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,17 +339,38 @@ Allows to configure the user profile allowed to delete published metadata.

![](img/metadata-delete.png)

## Metadata workflow

Allows to configure the metadata approval workflow (record life cycle). See [Life cycle](../../user-guide/workflow/life-cycle.md) for details about how the workflow is used.

- **Enable workflow** Enables the metadata approval workflow. When enabled, editors work on a draft copy of approved records and changes must be submitted and approved before they become visible to users outside the owner group. The default value is disabled.
- **Activate workflow for record created in** Restricts the groups for which the workflow is automatically activated when a record is created. Choose `Any group` to activate it for all groups, or `Selected groups` to provide a regular expression matching the group names where records must be set to draft status automatically. eg. `MYOCEAN-.*` to match all groups starting with `MYOCEAN-`, `GROUP1|GROUP2` to match `GROUP1` or `GROUP2`.
- **Allow submission/approval of invalid metadata** Allows the submission/approval of metadata that is not valid according to xsd or schematron rules. The default value is enabled.
- **Allow publication of non-approved metadata** Allows the publication of metadata that is not approved. The default value is enabled.

## Metadata publication

Allows to configure the required user profile to publish and un-publish metadata.
Allows to configure the publication of metadata records.

The settings in this section apply whether or not the metadata approval workflow is enabled.

The configured profile is evaluated on the metadata owner group (per-group role), not the user's global profile. The user must have exactly this profile in the record owner group. For example, with `Reviewer`, only users who are `Reviewer` in the owner group are allowed (not `UserAdmin`). Global `Administrator` is always allowed.
The required user profile is evaluated on the metadata owner group (per-group role), not the user's global profile. The user must have exactly this profile in the record owner group. For example, with `Reviewer`, only users who are `Reviewer` in the owner group are allowed (not `UserAdmin`). Global `Administrator` is always allowed.

- **Required profile to publish metadata** Profile required to publish metadata, evaluated in the record owner group (`Reviewer` or `Administrator`). The default value is `Reviewer`.
- **Required profile to un-publish metadata** Profile required to un-publish metadata, evaluated in the record owner group (`Reviewer` or `Administrator`). The default value is `Reviewer`.
- **Allow publication of invalid metadata** Allows the publication of metadata that is not valid according to xsd or schematron rules. When disabled, a record that is invalid cannot be published to the `All` group. The default value is enabled.
- **Automatic unpublication of invalid metadata** Automatically unpublishes metadata that, once edited, becomes not valid according to xsd or schematron rules. The default value is disabled.

![](img/metadata-publication.png)

## Metadata save

Allows to configure the behaviour when a metadata record is saved and the editor is closed.

This setting applies whether or not the metadata approval workflow is enabled.

- **Force validation on metadata save** When enabled, the validation of the metadata is forced (and its validation status stored) each time the record is saved and the editor is closed. The default value is disabled.

## Metadata selection - zip export

Allows to configure the zip export of metadata records and their attachments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,8 @@
<tocPage name="metadata/pdfReport/tocPage" position="12502" datatype="2" datatypeName="BOOLEAN">false</tocPage>
</pdfReport>
<publication name="metadata/publication" position="12021">
<allowPublishInvalidMd name="metadata/publication/allowPublishInvalidMd" position="100006" datatype="2" datatypeName="BOOLEAN">true</allowPublishInvalidMd>
<automaticUnpublishInvalidMd name="metadata/publication/automaticUnpublishInvalidMd" position="100007" datatype="2" datatypeName="BOOLEAN">false</automaticUnpublishInvalidMd>
<profilePublishMetadata name="metadata/publication/profilePublishMetadata" position="12021" datatype="0" datatypeName="STRING">Reviewer</profilePublishMetadata>
<profileUnpublishMetadata name="metadata/publication/profileUnpublishMetadata" position="12022" datatype="0" datatypeName="STRING">Reviewer</profileUnpublishMetadata>
</publication>
Expand All @@ -2188,14 +2190,14 @@
<enable name="metadata/vcs/enable" position="9161" datatype="2" datatypeName="BOOLEAN">false</enable>
</vcs>
<workflow name="metadata/workflow" position="100006">
<allowPublishInvalidMd name="metadata/workflow/allowPublishInvalidMd" position="100006" datatype="2" datatypeName="BOOLEAN">true</allowPublishInvalidMd>
<allowPublishNonApprovedMd name="metadata/workflow/allowPublishNonApprovedMd" position="100005" datatype="2" datatypeName="BOOLEAN">true</allowPublishNonApprovedMd>
<allowSubmitApproveInvalidMd name="metadata/workflow/allowSubmitApproveInvalidMd" position="100004" datatype="2" datatypeName="BOOLEAN">true</allowSubmitApproveInvalidMd>
<automaticUnpublishInvalidMd name="metadata/workflow/automaticUnpublishInvalidMd" position="100007" datatype="2" datatypeName="BOOLEAN">false</automaticUnpublishInvalidMd>
<draftWhenInGroup name="metadata/workflow/draftWhenInGroup" position="100003" datatype="0" datatypeName="STRING" />
<enable name="metadata/workflow/enable" position="100002" datatype="2" datatypeName="BOOLEAN">false</enable>
<forceValidationOnMdSave name="metadata/workflow/forceValidationOnMdSave" position="100008" datatype="2" datatypeName="BOOLEAN">false</forceValidationOnMdSave>
</workflow>
<save name="metadata/save" position="100008">
<forceValidationOnMdSave name="metadata/save/forceValidationOnMdSave" position="100008" datatype="2" datatypeName="BOOLEAN">false</forceValidationOnMdSave>
</save>
</metadata>
<region name="region" position="9590">
<getmap name="region/getmap" position="9590">
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ private void setOperations(

boolean sharingChanges = false;

boolean allowPublishInvalidMd = sm.getValueAsBool(Settings.METADATA_WORKFLOW_ALLOW_PUBLISH_INVALID_MD);
boolean allowPublishInvalidMd = sm.getValueAsBool(Settings.METADATA_PUBLICATION_ALLOW_PUBLISH_INVALID_MD);
boolean allowPublishNonApprovedMd = sm.getValueAsBool(Settings.METADATA_WORKFLOW_ALLOW_PUBLISH_NON_APPROVED_MD);

boolean isMdWorkflowEnable = sm.getValueAsBool(Settings.METADATA_WORKFLOW_ENABLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@

import static jeeves.guiservices.session.Get.getSessionAsXML;
import static org.fao.geonet.api.ApiParams.*;
import static org.fao.geonet.kernel.setting.Settings.METADATA_WORKFLOW_AUTOMATIC_UNPUBLISH_INVALID_MD;
import static org.fao.geonet.kernel.setting.Settings.METADATA_WORKFLOW_FORCE_VALIDATION_ON_MD_SAVE;
import static org.fao.geonet.kernel.setting.Settings.METADATA_PUBLICATION_AUTOMATIC_UNPUBLISH_INVALID_MD;
import static org.fao.geonet.kernel.setting.Settings.METADATA_SAVE_FORCE_VALIDATION_ON_MD_SAVE;
import static org.fao.geonet.repository.specification.OperationAllowedSpecs.*;
import static org.springframework.data.jpa.domain.Specification.where;

Expand Down Expand Up @@ -373,7 +373,7 @@ public void saveEdits(
if (terminate) {
Log.trace(Geonet.DATA_MANAGER, " > Closing editor");

boolean forceValidationOnMdSave = sm.getValueAsBool(METADATA_WORKFLOW_FORCE_VALIDATION_ON_MD_SAVE);
boolean forceValidationOnMdSave = sm.getValueAsBool(METADATA_SAVE_FORCE_VALIDATION_ON_MD_SAVE);

boolean reindex = false;

Expand Down Expand Up @@ -454,7 +454,7 @@ public void saveEdits(
reindex = true;
}

boolean automaticUnpublishInvalidMd = sm.getValueAsBool(METADATA_WORKFLOW_AUTOMATIC_UNPUBLISH_INVALID_MD);
boolean automaticUnpublishInvalidMd = sm.getValueAsBool(METADATA_PUBLICATION_AUTOMATIC_UNPUBLISH_INVALID_MD);
boolean isUnpublished = false;

// Unpublish the metadata automatically if the setting
Expand Down
2 changes: 1 addition & 1 deletion web-ui/src/main/resources/catalog/js/CatController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2213,7 +2213,7 @@
});

$scope.allowPublishInvalidMd = function () {
return gnConfig["metadata.workflow.allowPublishInvalidMd"];
return gnConfig["metadata.publication.allowPublishInvalidMd"];
};

$scope.allowPublishNonApprovedMd = function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@
// published: close w/o confirmation
if (
!$scope.gnCurrentEdit.metadata.isPublished() ||
!gnConfig["metadata.workflow.automaticUnpublishInvalidMd"]
!gnConfig["metadata.publication.automaticUnpublishInvalidMd"]
) {
$scope.confirmClose(submit, approve);
return;
Expand Down
13 changes: 7 additions & 6 deletions web-ui/src/main/resources/catalog/locales/az-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -932,21 +932,22 @@
"system/auditable/enable": "Allow auditing changes",
"system/auditable/enable-help": "When enabled, audits changes in users configuration",
"metadata/workflow": "Metadata iş axını",
"metadata/workflow/automaticUnpublishInvalidMd": "Etibarsız metadatanın avtomatik yayımdan çıxarılması",
"metadata/workflow/automaticUnpublishInvalidMd-help": "Xsd və ya şematron qaydalarına uyğun olaraq keçərli olmayan redaktə edilmiş metadatanı avtomatik olaraq yayımdan çıxarır.",
"metadata/publication/automaticUnpublishInvalidMd": "Etibarsız metadatanın avtomatik yayımdan çıxarılması",
"metadata/publication/automaticUnpublishInvalidMd-help": "Xsd və ya şematron qaydalarına uyğun olaraq keçərli olmayan redaktə edilmiş metadatanı avtomatik olaraq yayımdan çıxarır.",
"metadata/workflow/allowSubmitApproveInvalidMd": "Etibarsız metadatanın təqdim edilməsinə/təsdiqinə icazə verin",
"metadata/workflow/allowSubmitApproveInvalidMd-help": "Xsd və ya şematron qaydalarına uyğun olaraq etibarlı olmayan metadatanın təqdim edilməsinə/təsdiqlənməsinə icazə verir.",
"metadata/workflow/allowPublishNonApprovedMd": "Təsdiqlənməmiş metadataların dərcinə icazə verin",
"metadata/workflow/allowPublishNonApprovedMd-help": "Təsdiq edilməyən metadatanın dərcinə icazə verir.",
"metadata/workflow/allowPublishInvalidMd": "Yanlış metadatanın dərcinə icazə verin",
"metadata/workflow/allowPublishInvalidMd-help": "Xsd və ya şematron qaydalarına uyğun olaraq keçərli olmayan metadata dərc etməyə icazə verir.",
"metadata/publication/allowPublishInvalidMd": "Yanlış metadatanın dərcinə icazə verin",
"metadata/publication/allowPublishInvalidMd-help": "Xsd və ya şematron qaydalarına uyğun olaraq keçərli olmayan metadata dərc etməyə icazə verir.",
"metadata/workflow/draftWhenInGroup": "Yaradılmış qeyd üçün iş axınını aktivləşdirin",
"metadata/workflow/enable": "İş axınını aktivləşdirin",
"draftWhenInGroup-all": "İstənilən qrup",
"draftWhenInGroup-selection": "Seçilmiş qruplar",
"metadata/workflow/draftWhenInGroup-help": "Qeydin avtomatik qaralama statusu ilə qurulması lazım olduğu uyğun gələn qruplar üçün müntəzəm ifadə. məs. MYOCEAN-.* ilə başlayan bütün qrupları MYOCEAN-, GROUP1|GROUP2 ilə GROUP1 və ya GROUP2 ilə uyğunlaşdırmaq.",
"metadata/workflow/forceValidationOnMdSave": "Metadata saxlanarkən doğrulamağa məcbur edin",
"metadata/workflow/forceValidationOnMdSave-help": "Metadata saxlandıqda doğrulamağa məcbur edin",
"metadata/save": "Metadata save",
"metadata/save/forceValidationOnMdSave": "Metadata saxlanarkən doğrulamağa məcbur edin",
"metadata/save/forceValidationOnMdSave-help": "Metadata saxlandıqda doğrulamağa məcbur edin",
"metadata/import": "Metadata idxalı",
"metadata/import/restrict": "Sxemlərə idxalı məhdudlaşdırın",
"metadata/import/restrict-help": "Comma separated list of all allowed schemas for metadata to be imported. If the metadata schema is not allowed, then the import is not done. No value means all schemas allowed.",
Expand Down
13 changes: 7 additions & 6 deletions web-ui/src/main/resources/catalog/locales/ca-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -932,21 +932,22 @@
"system/auditable/enable": "Allow auditing changes",
"system/auditable/enable-help": "When enabled, audits changes in users configuration",
"metadata/workflow": "Flux de treball de la metadada",
"metadata/workflow/automaticUnpublishInvalidMd": "Despublicació automàtica de metadades invàlides",
"metadata/workflow/automaticUnpublishInvalidMd-help": "Despublicar automàticament les metadades que esdevenen invàlides segons les regles schematron quan aquestes s'editen.",
"metadata/publication/automaticUnpublishInvalidMd": "Despublicació automàtica de metadades invàlides",
"metadata/publication/automaticUnpublishInvalidMd-help": "Despublicar automàticament les metadades que esdevenen invàlides segons les regles schematron quan aquestes s'editen.",
"metadata/workflow/allowSubmitApproveInvalidMd": "Permetre l'enviament/aprovació de metadades invàlides.",
"metadata/workflow/allowSubmitApproveInvalidMd-help": "Permetre l'enviament/aprovació de metadades que no són vàlides d'acord als esquemes xsd o les regles schematron.",
"metadata/workflow/allowPublishNonApprovedMd": "Permetre la publicació de metadades no aprovades.",
"metadata/workflow/allowPublishNonApprovedMd-help": "Permet la publicació de metadades que no han estat aprovades.",
"metadata/workflow/allowPublishInvalidMd": "Permetre la publicació de metadades invàlides",
"metadata/workflow/allowPublishInvalidMd-help": "Permet la publicació de metadades que no siguin vàlides segons les regles xsd o schematron.",
"metadata/publication/allowPublishInvalidMd": "Permetre la publicació de metadades invàlides",
"metadata/publication/allowPublishInvalidMd-help": "Permet la publicació de metadades que no siguin vàlides segons les regles xsd o schematron.",
"metadata/workflow/draftWhenInGroup": "Activar el flux per a cada registre de metadades creat",
"metadata/workflow/enable": "Habilitar workflow",
"draftWhenInGroup-all": "Qualsevol grup",
"draftWhenInGroup-selection": "Grups seleccionats",
"metadata/workflow/draftWhenInGroup-help": "Expressió regular per capturar els grups on els registres s'hagin de posar automàticament en estat esborrany (draft). Per exemple: MYOCEAN-.* coincidirà amb els grups que comencen per MYOCEAN-, GROUP1|GROUP2 coincidirà amb GROUP1 i GROUP2.",
"metadata/workflow/forceValidationOnMdSave": "Força la validació en desar les metadades",
"metadata/workflow/forceValidationOnMdSave-help": "Quan es desen les metadades, forçar el procés de validació",
"metadata/save": "Metadata save",
"metadata/save/forceValidationOnMdSave": "Força la validació en desar les metadades",
"metadata/save/forceValidationOnMdSave-help": "Quan es desen les metadades, forçar el procés de validació",
"metadata/import": "Importació de metadades",
"metadata/import/restrict": "Restringir la importació al esquemes",
"metadata/import/restrict-help": "Comma separated list of all allowed schemas for metadata to be imported. If the metadata schema is not allowed, then the import is not done. No value means all schemas allowed.",
Expand Down
Loading
Loading