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

SHS-6029: Platform: "Reviewer" default role for viewing unpublished content #1746

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

cienvaras
Copy link
Collaborator

@cienvaras cienvaras commented Feb 11, 2025

Summary

  • Create and export "Reviewer" role
  • Add update hook to assign permissions to the new "Reviewer" role to view any unpublished content (except for Private Pages)

Need Review By (Date)

02/19

Urgency

medium

Steps to Test

  1. Visit the Roles page. Confirm that you can see the "Reviewer" role
  2. Visit the permission list page for the "Reviewer" role. Confirm that the only permissions assigned are the "View any unpublished content" for all content types, except for "Private Page".
  3. Edit a private page (for example Private page components) and unpublish it. Do the same for other node(s) (for example Testimonials).
  4. Edit the "Howard" user, remove the "Contributor" role and assign the "Author" role (or any other role that can't see unpublished content).
  5. Masquerade as Howard. Try to visit the pages that you previously unpublished. You shouldn't be able to do it.
  6. Log out and then log in again using the tugboat user.
  7. Edit the "Howard" user again and assign the "Reviewer" role
  8. Repeat step 5. Now you should be able to see the non Private Page node(s) you unpublished. You should still be unable to see any unpublished private page(s).

Review Tasks

Backend / Functional Validation

Code

  • Are the naming conventions following our standards?
  • Are PHP functions and variables in snake_case and not camelCase?
  • Does Drupal code follow Drupal Coding Standards?
  • Does the code have sufficient inline comments?
  • Is there anything in this code that would be hidden or hard to discover through the UI?
  • Are there any code smells?
  • Are tests provided?

Code security

General

  • Is there anything included in this PR that is not related to the problem it is trying to solve?
  • Is the approach to the problem appropriate?

@cienvaras cienvaras self-assigned this Feb 11, 2025
@ahughes3 ahughes3 temporarily deployed to Tugboat February 11, 2025 17:41 Destroyed
@cienvaras cienvaras requested a review from ahughes3 February 11, 2025 23:36
@cienvaras cienvaras assigned ahughes3 and unassigned cienvaras Feb 11, 2025
@cienvaras
Copy link
Collaborator Author

@ahughes3 Ready for your review.

Copy link
Collaborator

@ahughes3 ahughes3 left a comment

Choose a reason for hiding this comment

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

approved!

@ahughes3 ahughes3 requested a review from joegl February 12, 2025 18:22
@ahughes3 ahughes3 assigned joegl and unassigned ahughes3 Feb 12, 2025
Copy link
Contributor

@joegl joegl left a comment

Choose a reason for hiding this comment

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

LGTM.

@joegl joegl merged commit c7b9914 into 11.7.1-release Feb 12, 2025
26 of 28 checks passed
@joegl joegl deleted the shs-6029--reviewer-role branch February 12, 2025 19:01
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.

3 participants