Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kevin Lyda
cashier
Commits
0a6b1905
Commit
0a6b1905
authored
Jan 22, 2017
by
Kevin Lyda
💬
Browse files
Fix linty goodness.
parent
d7b6a359
Pipeline
#1164
failed with stage
in 2 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
server/auth/gitlab/gitlab.go
View file @
0a6b1905
...
...
@@ -39,10 +39,10 @@ func New(c *config.Auth) (auth.Provider, error) {
if
!
allUsers
&&
c
.
ProviderOpts
[
"group"
]
==
""
&&
len
(
uw
)
==
0
{
return
nil
,
errors
.
New
(
"gitlab_opts group and the users whitelist must not be both empty if allusers isn't true"
)
}
siteU
rl
:=
"https://gitlab.com/"
siteU
RL
:=
"https://gitlab.com/"
if
c
.
ProviderOpts
[
"siteurl"
]
!=
""
{
siteU
rl
=
c
.
ProviderOpts
[
"siteurl"
]
if
siteU
rl
[
len
(
siteU
rl
)
-
1
]
!=
'/'
{
siteU
RL
=
c
.
ProviderOpts
[
"siteurl"
]
if
siteU
RL
[
len
(
siteU
RL
)
-
1
]
!=
'/'
{
return
nil
,
errors
.
New
(
"gitlab_opts siteurl must end in /"
)
}
}
else
{
...
...
@@ -57,8 +57,8 @@ func New(c *config.Auth) (auth.Provider, error) {
ClientSecret
:
c
.
OauthClientSecret
,
RedirectURL
:
c
.
OauthCallbackURL
,
Endpoint
:
oauth2
.
Endpoint
{
AuthURL
:
siteU
rl
+
"oauth/authorize"
,
TokenURL
:
siteU
rl
+
"oauth/token"
,
AuthURL
:
siteU
RL
+
"oauth/authorize"
,
TokenURL
:
siteU
RL
+
"oauth/token"
,
},
Scopes
:
[]
string
{
"api"
,
...
...
@@ -67,7 +67,7 @@ func New(c *config.Auth) (auth.Provider, error) {
group
:
c
.
ProviderOpts
[
"group"
],
whitelist
:
uw
,
allusers
:
allUsers
,
baseurl
:
siteU
rl
+
"api/v3/"
,
baseurl
:
siteU
RL
+
"api/v3/"
,
},
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment