From 99009e5d3b965a2c1d67b4bbfd4861b7ad0f3627 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com> Date: Tue, 11 May 2021 16:05:11 -0400 Subject: [PATCH] Permission Tag Scoping Field (#127) This allows tag scoping permissions that don't start with `discussion`, or on the contrary, removing tag scoping from permissions that DO start with `discussion`. Co-authored-by: Sami Mazouz --- extensions/tags/js/src/admin/addTagsPermissionScope.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/tags/js/src/admin/addTagsPermissionScope.js b/extensions/tags/js/src/admin/addTagsPermissionScope.js index f6593d6f3..3de3d35c3 100644 --- a/extensions/tags/js/src/admin/addTagsPermissionScope.js +++ b/extensions/tags/js/src/admin/addTagsPermissionScope.js @@ -32,7 +32,8 @@ export default function() { render: item => { if (item.permission === 'viewDiscussions' || item.permission === 'startDiscussion' - || (item.permission && item.permission.indexOf('discussion.') === 0)) { + || (item.permission && item.permission.indexOf('discussion.') === 0 && item.tagScoped !== false) + || item.tagScoped) { return PermissionDropdown.component({ permission: 'tag' + tag.id() + '.' + item.permission, allowGuest: item.allowGuest