Permissions for mail policies

Created on 24 October 2024, 7 months ago

Problem/Motivation

Some roles should be able to change mail templates. Currently its only possible to give all or no permissions for Symfony mailer module

Proposed resolution

Add permissions, add access callback for Policy entity

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands robbertnl

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @robbertnl
  • 🇳🇱Netherlands robbertnl

    I created a patch for his, see attachment

  • 🇬🇧United Kingdom adamps

    Thanks it's a good idea.

    Drupal.org now requires merge requests instead of patches. There is a new 2.x branch now and all fixes should be against that. There is now a separate module for mailer policy so your fix makes a lot of sense.

  • Merge request !119Add permissions for mailer policies → (Open) created by robbertnl
  • Pipeline finished with Failed
    6 months ago
    Total: 166s
    #329298
  • Pipeline finished with Failed
    6 months ago
    Total: 188s
    #329312
  • Pipeline finished with Success
    6 months ago
    #329338
  • 🇳🇱Netherlands robbertnl

    Added fork/MR the 2.x branch

  • 🇬🇧United Kingdom adamps

    Thanks I've taken a look.

    Please can you give me any example in Core where a config entity has an access control hander and complex permissions like this?

    The IS says

    Some roles should be able to change mail templates only

    A possible simpler solution: have a single permission for changing mailer policy, separate from any other permission of this module.

  • 🇳🇱Netherlands robbertnl

    @adamps
    Maybe config entity type Menu, see /core/modules/system/src/Entity/Menu.php and its control handler core/modules/system/src/MenuAccessControlHandler.php

  • 🇬🇧United Kingdom adamps

    True, but looks like that is for "Locked menus should not be deleted". I don't see extra permissions in that case.

    Do you have a particular use case that would not be solved with the suggestion from #7?

  • Status changed to Needs work 4 months ago
  • 🇬🇧United Kingdom adamps
Production build 0.71.5 2024