From 0f083abdf4f26715186890fe49b054077887e31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Thu, 7 May 2020 22:35:29 +0200 Subject: [PATCH] Added permissions to show history of and revert label profiles. --- config/permissions.yaml | 8 ++++++++ src/Security/Voter/LabelProfileVoter.php | 2 ++ 2 files changed, 10 insertions(+) diff --git a/config/permissions.yaml b/config/permissions.yaml index 1683f372..52bb8947 100644 --- a/config/permissions.yaml +++ b/config/permissions.yaml @@ -486,5 +486,13 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co label: "perm.labels.use_twig" bit: 12 alsoSet: ['create_labels', 'edit_options'] + show_history: + label: "perm.show_history" + bit: 14 + alsoSet: ['read_profiles'] + revert_element: + label: "perm.revert_elements" + bit: 16 + alsoSet: ['read_profiles', 'edit_profiles', 'create_profiles', 'delete_profiles'] diff --git a/src/Security/Voter/LabelProfileVoter.php b/src/Security/Voter/LabelProfileVoter.php index 0b655166..d8abc7ea 100644 --- a/src/Security/Voter/LabelProfileVoter.php +++ b/src/Security/Voter/LabelProfileVoter.php @@ -32,6 +32,8 @@ class LabelProfileVoter extends ExtendedVoter 'create' => 'create_profiles', 'edit' => 'edit_profiles', 'delete' => 'delete_profiles', + 'show_history' => 'show_history', + 'revert_element' => 'revert_element', ]; /**