Skip to content

Commit

Permalink
pkp/pkp-lib#10571 WIP: Allow admins and managers to assign user group…
Browse files Browse the repository at this point in the history
…s to email templates within a mailable
  • Loading branch information
taslangraham committed Nov 25, 2024
1 parent a67fd26 commit 375426e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Container/ManageEmailsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,14 @@ export default {
});
}
// Remove user group fields if current mailable does not support specifying user group access
if (!this.currentMailable.canAssignUserGroupToTemplates) {
templateForm.fields = templateForm.fields.filter(
(field) =>
!['assignedUserGroupIds', 'isUnrestricted'].includes(field.name),
);
}
templateForm.fields = templateForm.fields.map((field) => {
if (field.name === 'body') {
field.preparedContent = Object.keys(
Expand Down

0 comments on commit 375426e

Please sign in to comment.