Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

ISAICP-6321: Allow revision access to non moderator users. #2407

Merged
merged 45 commits into from
Apr 6, 2021

Conversation

idimopoulos
Copy link
Contributor

No description provided.

@idimopoulos idimopoulos force-pushed the ISAICP-6321 branch 2 times, most recently from 1f627fe to 69d3abd Compare February 28, 2021 09:55
…group properties, not community content properties.
By extending FieldableEntityInterface the IDE can make much better sense of the
capabilities of entities that implement this interface.
…bypass content moderation to a post-moderated workflow.

This is preventing code that sends out notifications from determining the actual
workflow. We shouldn't pretend that a post-moderated workflow is used if we are
in a pre-moderated group.
…n existing content and publish it without facilitator intervention.
… when a new revision is created in proposed state.
…validated to proposed, this is done using the button 'Propose changes', while for a facilitator this remains 'Request changes' as before.
…al member transitions content from validated to proposed.
@pfrenssen
Copy link
Contributor

This came back from UAT with some suggestion to update the scope of this ticket (ref. comments in the Jira ticket). This resulted in some necessary changes to the workflow:

  • All members are now allowed to transition content from validated to proposed, but the button label needs to be different in case the transition is done by a facilitator (= Request changes) or the original author of the content (= Propose changes). I implemented an event that allows to alter the button labels dynamically: StateMachineButtonLabelsEvent.
  • In the case of pre-moderated content, we should send out different notications to the collection owner and the content author when the transition from validated to proposed is executed. An owner should get a message that "content is proposed for publication" while the content author should still get the existing message "a facilitator has requested you to modify the content".
  • This also means that the workflow is now different between pre-moderated and post-moderated collections. This caused failures for members with the author role. Beforehand we were handling this role by dynamically swapping an author from pre-moderated to post-moderated, but this is no longer possible. If an author is pretended to be post-moderated, then these changes to the pre-moderated workflow are no longer taking effect. It took some time to unravel this, but I was able to solve it by removing the workaround with the publish content in moderated groups permission and replacing it with standard transition permissions and updating the joinup_community_content.permission_scheme file. It is now handled in the same way as how a facilitator is being able to transition content to validated state.

I tried to order the commits for this latest round of changes in a logical way to make it easier to review. The commits are starting on March 19 (commit ea90a0a6):

  1. First (to warm up) the small fixes + API additions that I did during the session.
  2. I understood that discussions are always post-moderated after a discussion with @idimopoulos. Added a bunch of comments and updated test coverage of this ticket. This was also not handled correctly in the first iteration of this PR, but is now fixed. (commit 1cf025ad26)
  3. A commit to get a green build again after the removal of the author role publish content in moderated groups workaround. I wanted to get a green build before doing the next 2 steps. These are the final changes that complete the removal of the workaround. Commit 7ebb654e9.
  4. Add a failing test for the notifications that should now be sent. Commit 583f4af.
  5. The implementation of the notifications in a single commit, turning the test green. Commit 6eaee3d.
  6. Add a failing test for the changing of the button from Request changes to Propose changes. Commit bb34143e4.
  7. Implement the changing of the button label + 1 additional commit to make the tests green again (I had a small bug in the test). Last 2 commits.

@claudiu-cristea claudiu-cristea merged commit c845e15 into develop Apr 6, 2021
@claudiu-cristea claudiu-cristea deleted the ISAICP-6321 branch April 6, 2021 08:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants