Skip to content
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

Workflows permissions and transitions #99

Merged
merged 7 commits into from
Jul 14, 2021

Conversation

stephen-cox
Copy link
Member

@stephen-cox stephen-cox commented Jun 25, 2021

Adds contributor and user manager roles to localgov_roles and updates default permissions assigned to all roles in localgov_workflows.

Closes #92

@stephen-cox
Copy link
Member Author

The functionality of the work hear has been tested and reviewed on #92 so this is ready for a code review; which is mainly tests.

Copy link
Member

@finnlewis finnlewis left a comment

Choose a reason for hiding this comment

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

I'm happy with this. I've tested it locally and read the config and code.
Would be good to get an OK from @andybroomfield or @Adnan-cds - based on the discussion on #111 we plan to get this work in first, then split off the localgov_workflows as a separate module.

$en_node = $node_storage->loadRevision($node_storage->getLatestRevisionId($en_node->id()));
$cy_translation = $en_node->getTranslation('cy');
$this->assertEquals('archived', $en_node->moderation_state->value);
$this->assertEquals('published', $cy_translation->moderation_state->value);
Copy link
Member

Choose a reason for hiding this comment

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

I like this testing of translations @stephen-cox, protecting the future!

Copy link
Contributor

@andybroomfield andybroomfield left a comment

Choose a reason for hiding this comment

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

Ok as per #111 this is split out when localgov_workflow is made its own module.

@stephen-cox stephen-cox merged commit c5ec12f into 2.x Jul 14, 2021
@stephen-cox stephen-cox deleted the feature/92-workflow-permissions branch July 14, 2021 11:52
stephen-cox added a commit to localgovdrupal/localgov_workflows that referenced this pull request Jul 14, 2021
* Added contributor role and updated workflow permissions (localgovdrupal/localgov_core#92)

* Added User Manager role with permissions to create users and assign author, contributor and editor roles using the Role Delegation module (localgovdrupal/localgov_core#92)

* Updated permissions and added tests for workflow transitions and translated content
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.

Workflows permissions [epic?]: define new roles, states, transitions and permissions.
3 participants