Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C civicrm-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 113
    • Merge requests 113
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CiviCRM
  • civicrm-core
  • Merge requests
  • !17480

Open
Created Jun 03, 2020 by Michael O'Toole@MikeyMJCOOwner
  • Report abuse
Report abuse

dev/core#1751: [Create Email] Only Show Update/Save Template when User has Permission to Edit Templates

  • Overview 2
  • Commits 1
  • Changes 2

Created by: tunbola

Overview

In the email modal, CiviCRM users can write an email from scratch or use an existing message template. They are given the options to update existing templates or save a new template.

These options are currently available and can be completed by users with basic access to CiviCRM, even when they do not have the permission CiviCRM: edit message templates.

Organisations want to create standard message templates that cannot be altered by the hundreds of staff using the templates. They need to be able to set this up as a user permission.

Before

A Civicrm user without access to the CiviCRM: edit message templates permission can update existing templates or save a new template when sending an email via the email activity form.

After

The CiviCRM: edit message templates permission is needed to update existing templates or save a new template when sending an email via the email activity form.

User without edit message templates permission: Casee User  CaseLatest 2020-06-03 18-33-32

User with edit message templates permission: Manage Cases  CaseLatest 2020-06-03 18-34-26

Technical Details

The permission check for edit message templates was added in the EmailCommon Template before displaying the Update Template and Save as New Template checkboxes. After making this change, there were some errors in the console regarding these two fields for the case where the user does not have the edit message templates permission, some checks were added in these functions for the existent of these fields before the logic were executed.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/tunbola/email-template-perms