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

Implement role check for mailables #10571

Open
1 task
Tracked by #10403
taslangraham opened this issue Oct 30, 2024 · 5 comments
Open
1 task
Tracked by #10403

Implement role check for mailables #10571

taslangraham opened this issue Oct 30, 2024 · 5 comments
Assignees
Labels
Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks.
Milestone

Comments

@taslangraham
Copy link
Contributor

taslangraham commented Oct 30, 2024

As part of the work that needs to be done for #10403, we need to implement role checks for mailables and email templates:

  • Role Designation for Email Templates: Enable editors to assign specific user groups when creating or editing an email template. This feature should be restricted to mailables associated with the submission workflow.

    • This will require UI work on the Edit/Add Template side modal to support selecting user groups. Maybe something like a list of checkboxes or a multi-select dropdown might be enough. @Devika008 Tagging here for your input
  • Role Designation for mailables Allow mailables to be assigned to specific roles, ensuring that templates are accessible only to users with relevant roles.

  • Template-Specific Restrictions: Users should only access templates explicitly assigned to their group within each mailable. For example, if a mailable is accessible to both editors and authors, but a specific template is restricted to editors, then only editors should see that template, and authors should not have access.

PRs
ojs - pkp/ojs#4510
pkp-lib - https://github.com/pkp/pkp-lib/pull/10581/files
ui-library - pkp/ui-library#446

omp - pkp/omp#1768
ops - https://github.com/pkp/ops/pull/815/files

@taslangraham taslangraham self-assigned this Oct 30, 2024
@taslangraham taslangraham added the Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks. label Oct 30, 2024
@ewhanson ewhanson added this to the 3.6 milestone Oct 30, 2024
@mreiko mreiko added this to OSS ORE Oct 31, 2024
@mreiko mreiko removed this from OSS ORE Oct 31, 2024
taslangraham added a commit to taslangraham/ojs that referenced this issue Nov 5, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 5, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 6, 2024
taslangraham added a commit to pkp/ui-library that referenced this issue Nov 6, 2024
taslangraham added a commit to pkp/ui-library that referenced this issue Nov 7, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 8, 2024
taslangraham added a commit to taslangraham/ui-library that referenced this issue Nov 8, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 8, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 8, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 9, 2024
taslangraham added a commit to taslangraham/ojs that referenced this issue Nov 10, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 12, 2024
taslangraham added a commit to taslangraham/ui-library that referenced this issue Nov 12, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 12, 2024
taslangraham added a commit to taslangraham/ui-library that referenced this issue Nov 12, 2024
taslangraham added a commit to taslangraham/ojs that referenced this issue Nov 12, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 12, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 13, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 13, 2024
taslangraham added a commit to taslangraham/ojs that referenced this issue Nov 13, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 14, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 14, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 14, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 14, 2024
@ewhanson
Copy link
Collaborator

Thanks, @taslangraham. It's looking good. Lots going on here!

Mostly a few minor requests, but I would like to take a look at the field components together. I think we can get away with using the existing FieldOptions component, which will probably remove the need for any changes in the UI library as well as reduce the number of places that state will need to be tracked.

We can take a look together on our next call, but feel free to have a look ahead of time. Since none of user groups will be changing dynamically on the frontend, we can do all this setup in PHP and just pass the options through the form setup functions. Let me know if you have any questions.

@taslangraham
Copy link
Contributor Author

@ewhanson Thanks for the review! I'll make the requested changes, and look into the usage of the FieldOptions as you suggested.

taslangraham added a commit to taslangraham/ui-library that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/ojs that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/ojs that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/omp that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/ops that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/ui-library that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/ui-library that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/ui-library that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/ui-library that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/omp that referenced this issue Nov 25, 2024
taslangraham added a commit to taslangraham/ops that referenced this issue Nov 25, 2024
@taslangraham
Copy link
Contributor Author

@ewhanson I've made updates based on your review feedback and our discussion earlier today.
Important commits are:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks.
Projects
None yet
Development

No branches or pull requests

2 participants