Commit d6222d22 authored by Douwe Maan's avatar Douwe Maan

Minor code tweak

parent e2f93d2e
......@@ -124,7 +124,7 @@ class Group < Namespace
end
def ldap_synced?
ldap_cn.present?
Gitlab.config.ldap.enabled && ldap_cn.present?
end
def post_create_hook
......
......@@ -19,7 +19,7 @@
- if current_user && current_user.can?(:admin_group_member, @group)
.pull-right
- if ldap_enabled? && @group.ldap_synced?
- if @group.ldap_synced?
= link_to reset_access_group_ldap_path(@group), class: 'btn btn-grouped', data: { confirm: "Force GitLab to do LDAP permission checks for all group members? All members besides yourself will be reduced to 'Guest' access until their next interaction with GitLab." }, method: :put do
Clear LDAP permission cache
......@@ -30,7 +30,7 @@
.js-toggle-content.hide.new-group-member-holder
= render "new_group_member"
- if ldap_enabled? && @group.ldap_synced?
- if @group.ldap_synced?
.bs-callout.bs-callout-info
The members of this group are managed using LDAP and cannot be added, changed or removed here.
Because LDAP permissions in GitLab get updated one user at a time and because GitLab caches LDAP check results, changes on your LDAP server or in this group's LDAP sync settings may take up to #{Gitlab.config.ldap['sync_time']}s to show in the list below.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment