Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
a3092dc5
Unverified
Commit
a3092dc5
authored
May 29, 2019
by
Oleg Gaidarenko
Committed by
GitHub
May 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LDAP: remove unused function (#17351)
parent
d4ef1973
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
pkg/services/ldap/ldap.go
+5
-11
No files found.
pkg/services/ldap/ldap.go
View file @
a3092dc5
...
...
@@ -30,7 +30,6 @@ type IConnection interface {
type
IServer
interface
{
Login
(
*
models
.
LoginUserQuery
)
(
*
models
.
ExternalUserInfo
,
error
)
Users
([]
string
)
([]
*
models
.
ExternalUserInfo
,
error
)
ExtractGrafanaUser
(
*
UserInfo
)
(
*
models
.
ExternalUserInfo
,
error
)
InitialBind
(
string
,
string
)
error
Dial
()
error
Close
()
...
...
@@ -148,6 +147,11 @@ func (server *Server) Login(query *models.LoginUserQuery) (
// Check if a second user bind is needed
user
:=
users
[
0
]
if
err
:=
server
.
validateGrafanaUser
(
user
);
err
!=
nil
{
return
nil
,
err
}
if
server
.
requireSecondBind
{
err
=
server
.
secondBind
(
user
,
query
.
Password
)
if
err
!=
nil
{
...
...
@@ -188,16 +192,6 @@ func (server *Server) Users(logins []string) (
return
serializedUsers
,
nil
}
// ExtractGrafanaUser extracts external user info from LDAP user
func
(
server
*
Server
)
ExtractGrafanaUser
(
user
*
UserInfo
)
(
*
models
.
ExternalUserInfo
,
error
)
{
result
:=
server
.
buildGrafanaUser
(
user
)
if
err
:=
server
.
validateGrafanaUser
(
result
);
err
!=
nil
{
return
nil
,
err
}
return
result
,
nil
}
// validateGrafanaUser validates user access.
// If there are no ldap group mappings access is true
// otherwise a single group must match
...
...
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