settings user groups: Fix organization admin can not create user groups.

The bug was in complex `if` condition, which should mean that users should
be allowed to create a User group only when they are either admin or user
group creation policy is set to everyone.

Fixes: #13909.
This commit is contained in:
Pragati Agrawal
2020-02-22 00:43:14 +05:30
committed by Tim Abbott
parent 147c3998de
commit 64ec413940

View File

@@ -11,7 +11,7 @@
<p>
{{#tr this}}User groups allow you to <a href="/help/mention-a-user-or-group" target="_blank">mention</a> multiple users at once. When you mention a user group, everyone in the group is notified as if they were individually mentioned.{{/tr}}
</p>
{{#unless (and (not (eq realm_user_group_edit_policy USER_GROUP_EDIT_POLICY_MEMBERS) (not is_admin)))}}
{{#if (or is_admin (eq realm_user_group_edit_policy USER_GROUP_EDIT_POLICY_MEMBERS))}}
<form class="form-horizontal admin-user-group-form">
<div class="add-new-user-group-box grey-box">
<div class="new-user-group-form">
@@ -31,7 +31,7 @@
</div>
</div>
</form>
{{/unless}}
{{/if}}
{{/unless}}
<div id="user-groups" class="new-style"></div>