Skip to content
代码片段 群组 项目
提交 8761dd2a 编辑于 作者: Jacob Vosmaer's avatar Jacob Vosmaer
浏览文件

Check LDAP user filter during sign-in

上级 a5cbb4cb
No related branches found
No related tags found
无相关合并请求
...@@ -33,6 +33,7 @@ v 7.0.0 ...@@ -33,6 +33,7 @@ v 7.0.0
- Overall performance improvements - Overall performance improvements
- Skip init script check on omnibus-gitlab - Skip init script check on omnibus-gitlab
- Be more selective when killing stray Sidekiqs - Be more selective when killing stray Sidekiqs
- Check LDAP user filter during sign-in
v 6.9.2 v 6.9.2
- Revert the commit that broke the LDAP user filter - Revert the commit that broke the LDAP user filter
......
...@@ -20,7 +20,15 @@ def ldap ...@@ -20,7 +20,15 @@ def ldap
# if the authentication to LDAP was successful. # if the authentication to LDAP was successful.
@user = Gitlab::LDAP::User.find_or_create(oauth) @user = Gitlab::LDAP::User.find_or_create(oauth)
@user.remember_me = true if @user.persisted? @user.remember_me = true if @user.persisted?
sign_in_and_redirect(@user)
gitlab_ldap_access do |access|
if access.allowed?(@user)
sign_in_and_redirect(@user)
else
flash[:alert] = "Access denied for your LDAP account."
redirect_to new_user_session_path
end
end
end end
private private
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册