Skip to content

[Backport 4.2.x] Hide enable workflow button when group owner does not match workflow group matching regex #8831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025

Conversation

ianwallen
Copy link
Contributor

Backport #8699
Authored by: @tylerjmchugh

@ianwallen ianwallen added this to the 4.2.14 milestone May 28, 2025
gnMetadataActions.isGroupWithWorkflowEnabled(scope.ownerGroupName)
);
};

loadTasks();
loadWorkflowStatus();

Copy link
Contributor

@tylerjmchugh tylerjmchugh May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need the logic you removed so we can correctly load the group owner.

I think the watch statement should look something like:

scope.$watch(attrs.gnMdActionsMenu, function (a) {
  scope.md = a;
  if (scope.md && scope.md.groupOwner) {
    // Load the group owner name when the metadata record changes
    gnMetadataActions.getGroupName(scope.md.groupOwner).then(function (name) {
      scope.ownerGroupName = name;
    });
  }
});

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@ianwallen ianwallen force-pushed the backport-8699-to-4.2.x branch from d1ec756 to 258d99b Compare May 28, 2025 17:41
@ianwallen ianwallen requested a review from tylerjmchugh May 29, 2025 09:36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is font-awesome changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

…t match workflow group matching regex (geonetwork#8699)

* add isProfileOrMoreForGroup method

* Hide enable workflow button if group name does not match regex

* Move workflow option display logic to function

* Hide workflow label when no options are shown

* Move configuration variables to CatController

* Hide workflow status label from editor board

* Prevent enabling workflow for groups with workflow disabled in API

* Refactor

* Hide warnPublishDraft confirmation when workflow is not enabled

* Add message

* Display status label if workflow is already enabled

* Prevent setting status from null to any status for records owned by groups with workflow disabled

* Add dutch messages

* Remove ES6 code
@ianwallen ianwallen force-pushed the backport-8699-to-4.2.x branch from 258d99b to be429a7 Compare May 29, 2025 13:06
@ianwallen ianwallen merged commit 56fa0fe into geonetwork:4.2.x May 29, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants