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

Limit email template access by sender and receiver role #10403

Open
3 of 4 tasks
asmecher opened this issue Sep 12, 2024 · 4 comments
Open
3 of 4 tasks

Limit email template access by sender and receiver role #10403

asmecher opened this issue Sep 12, 2024 · 4 comments
Assignees
Milestone

Comments

@asmecher
Copy link
Member

asmecher commented Sep 12, 2024

It's currently possible to create new email templates for mailables in a way that helps editors create their own email-based workflows. However, all mailables are available to all users when selecting a template, which can lead to inappropriate choices.

From e.g. Settings > Workflow > Emails > Add and edit templates > Discussion (Copyediting):
Image

When an assigned Copyeditor goes to create a new discussion in the Copyediting stage, their Choose a predefined message to use dropdown includes Request Copyedit, which is inappropriate.

To resolve this, we should add support for mailables to be designated as appropriate for certain user groups, so that when a user sees a list of possible email templates, they are only given a list that's relevant or appropriate to them. It should be possible to designate user groups when creating/editing an email template within a mailable. This should only be available on certain mailables, as not all will be related to submission workflow.

Update 2024-10-25: Specification

(from @ewhanson)

Initial steps should be to identify which roles should have access to which mailable templates as well as identifying all mailables across all applications and first-party plugins (if any). From an initial assessment of the feature, it doesn't seem like any new UI elements/pages will be necessary, but an additional todo for that work should be added if it's deemed necessary. Any mailables that roles do not have access to should not show up when creating new templates.

Note: Each todo below should be tracked as separate issues. This issue should only be closed once this work package has been finished entirely.

TODOs

@asmecher asmecher added this to OSS ORE Aug 29, 2024
@asmecher asmecher converted this from a draft issue Sep 12, 2024
@asmecher asmecher added this to the 3.6 milestone Sep 12, 2024
@mreiko mreiko moved this to Todo in PKP Public Roadmap Oct 24, 2024
@ewhanson ewhanson moved this from To Do to Specification In Progress in OSS ORE Oct 25, 2024
@ewhanson ewhanson moved this from Todo to In Progress in PKP Public Roadmap Oct 25, 2024
@ewhanson
Copy link
Collaborator

ewhanson commented Oct 25, 2024

Hey @taslangraham, I've also assigned the issue for this work package to you. Have a look at the specification and todos above and let me know what you think. We can talk about any specific issues or questions you see in our one-on-one call on Monday.

@ewhanson ewhanson closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
@github-project-automation github-project-automation bot moved this from Specification In Progress to Backlog in OSS ORE Oct 25, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in PKP Public Roadmap Oct 25, 2024
@ewhanson ewhanson reopened this Oct 25, 2024
@ewhanson ewhanson moved this from Backlog to Specification In Progress in OSS ORE Oct 25, 2024
@ewhanson ewhanson moved this from Done to In Progress in PKP Public Roadmap Oct 25, 2024
@taslangraham
Copy link
Contributor

taslangraham commented Oct 28, 2024

@asmecher

Currently, each Mailable class has two properties: fromRoleIds and toRoleIds. These arrays hold the Role IDs of the groups designated to send and receive each Mailable. These properties could be used to control which templates are accessible and visible to a user.

However, in the issue, you mentioned that

It should be possible to designate user groups when creating/editing an email template within a Mailable.

Given that each Mailable can be restricted to specific groups, is it a case where we should also allow individual templates of a Mailable to be further limited to a subset of these allowed groups?

For example, if a Mailable is accessible to more than one role, should an individual template of this Mailable be configurable to allow access only to a single role?

@asmecher
Copy link
Member Author

Yes, individual templates should be assignable to sender roles. Think of a discussion template; if managers want to use that to orchestrate a workflow between author and editor, there will be a mix of templates each will use to compose messages. It will be confusing to authors if they see editor templates available for their use.

@asmecher
Copy link
Member Author

Some clarification and a mea culpa for the ambiguous language in the initial filing: The user working in settings should be able to designate which user groups (not role IDs) email templates can be sent by and sent to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Status: In Progress
Development

No branches or pull requests

4 participants