FIX: do not show invite button if local logins are disabled

FIX: do not show invite button if local logins are disabled

diff --git a/app/assets/javascripts/admin/templates/users-list.hbs b/app/assets/javascripts/admin/templates/users-list.hbs
index 681eb94..f11dcdd 100644
--- a/app/assets/javascripts/admin/templates/users-list.hbs
+++ b/app/assets/javascripts/admin/templates/users-list.hbs
@@ -10,9 +10,9 @@
       {{nav-item route='adminUsersList.show' routeParam='staged' label='admin.users.nav.staged'}}
       {{nav-item route='groups' label='groups.index.title'}}
       <div class="admin-actions">
-    {{#unless siteSettings.enable_sso}}
+    {{#if currentUser.can_invite_to_forum}}
       {{d-button class="btn-default" action=(route-action "sendInvites") title="admin.invite.button_title" icon="user-plus" label="admin.invite.button_text"}}
-    {{/unless}}
+    {{/if}}
     {{#if currentUser.admin}}
       {{d-button class="btn-default" action=(route-action "exportUsers") title="admin.export_csv.button_title.user" icon="download" label="admin.export_csv.button_text"}}
     {{/if}}

GitHub sha: bd084b21

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: