Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Allow to use private gitlab server
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Le Marec - Pasquet <[email protected]>
  • Loading branch information
kiorky committed Jul 26, 2018
1 parent 8c9b4f8 commit f777a5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/auth/omniauth_callbacks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def check_membership
when "gitlab"
if conf["group"].present?
# Get user's groups.
is_member = member_of("https://gitlab.com/api/v4/groups") do |g|
server = conf.fetch("server", "")
server = server.presence || "https://gitlab.com"
is_member = member_of("#{server}/api/v4/groups") do |g|
g["name"] == conf["group"]
end
"The Gitlab account isn't in allowed group." unless is_member
Expand Down

0 comments on commit f777a5e

Please sign in to comment.