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 <sychocouldy@gmail.com>
This commit is contained in:
Alexander Skvortsov 2021-05-11 16:05:11 -04:00 committed by GitHub
parent dfbb468744
commit 99009e5d3b

View File

@ -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