Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
9840fccd
Commit
9840fccd
authored
6 years ago
by
James Nord
Browse files
Options
Downloads
Patches
Plain Diff
rename useLoginAsId -> useLoginAsID
parent
5822a5ce
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Documentation/connectors/github.md
+1
-1
1 addition, 1 deletion
Documentation/connectors/github.md
connector/github/github.go
+4
-4
4 additions, 4 deletions
connector/github/github.go
connector/github/github_test.go
+1
-1
1 addition, 1 deletion
connector/github/github_test.go
with
6 additions
and
6 deletions
Documentation/connectors/github.md
+
1
−
1
View file @
9840fccd
...
...
@@ -69,7 +69,7 @@ connectors:
teamNameField
:
slug
# flag which will switch from using the internal GitHub id to the users handle (@mention) as the user id.
# It is possible for a user to change their own user name but it is very rare for them to do so
useLoginAsI
d
:
false
useLoginAsI
D
:
false
```
## GitHub Enterprise
...
...
This diff is collapsed.
Click to expand it.
connector/github/github.go
+
4
−
4
View file @
9840fccd
...
...
@@ -48,7 +48,7 @@ type Config struct {
RootCA
string
`json:"rootCA"`
TeamNameField
string
`json:"teamNameField"`
LoadAllGroups
bool
`json:"loadAllGroups"`
UseLoginAsI
d
bool
`json:"useLoginAsI
d
"`
UseLoginAsI
D
bool
`json:"useLoginAsI
D
"`
}
// Org holds org-team filters, in which teams are optional.
...
...
@@ -84,7 +84,7 @@ func (c *Config) Open(id string, logger logrus.FieldLogger) (connector.Connector
clientSecret
:
c
.
ClientSecret
,
apiURL
:
apiURL
,
logger
:
logger
,
useLoginAsI
d
:
c
.
UseLoginAsI
d
,
useLoginAsI
D
:
c
.
UseLoginAsI
D
,
}
if
c
.
HostName
!=
""
{
...
...
@@ -151,7 +151,7 @@ type githubConnector struct {
// if set to true and no orgs are configured then connector loads all user claims (all orgs and team)
loadAllGroups
bool
// if set to true will use the users handle rather than their numeric id as the ID
useLoginAsI
d
bool
useLoginAsI
D
bool
}
// groupsRequired returns whether dex requires GitHub's 'read:org' scope. Dex
...
...
@@ -271,7 +271,7 @@ func (c *githubConnector) HandleCallback(s connector.Scopes, r *http.Request) (i
Email
:
user
.
Email
,
EmailVerified
:
true
,
}
if
c
.
useLoginAsI
d
{
if
c
.
useLoginAsI
D
{
identity
.
UserID
=
user
.
Login
}
...
...
This diff is collapsed.
Click to expand it.
connector/github/github_test.go
+
1
−
1
View file @
9840fccd
...
...
@@ -192,7 +192,7 @@ func TestLoginUsedAsIDWhenConfigured(t *testing.T) {
req
,
err
:=
http
.
NewRequest
(
"GET"
,
hostURL
.
String
(),
nil
)
expectNil
(
t
,
err
)
c
:=
githubConnector
{
apiURL
:
s
.
URL
,
hostName
:
hostURL
.
Host
,
httpClient
:
newClient
(),
useLoginAsI
d
:
true
}
c
:=
githubConnector
{
apiURL
:
s
.
URL
,
hostName
:
hostURL
.
Host
,
httpClient
:
newClient
(),
useLoginAsI
D
:
true
}
identity
,
err
:=
c
.
HandleCallback
(
connector
.
Scopes
{
Groups
:
true
},
req
)
expectNil
(
t
,
err
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment