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
58364277
Unverified
Commit
58364277
authored
Jul 01, 2019
by
Oleg Gaidarenko
Committed by
GitHub
Jul 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Login: divide login errors by pkg and service (#17835)
Define errors in the login module only if they are used
parent
f3f03ceb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
12 deletions
+3
-12
pkg/login/auth.go
+0
-3
pkg/services/login/errors.go
+3
-9
No files found.
pkg/login/auth.go
View file @
58364277
...
...
@@ -10,15 +10,12 @@ import (
var
(
ErrEmailNotAllowed
=
errors
.
New
(
"Required email domain not fulfilled"
)
ErrNoLDAPServers
=
errors
.
New
(
"No LDAP servers are configured"
)
ErrInvalidCredentials
=
errors
.
New
(
"Invalid Username or Password"
)
ErrNoEmail
=
errors
.
New
(
"Login provider didn't return an email address"
)
ErrProviderDeniedRequest
=
errors
.
New
(
"Login provider denied login request"
)
ErrSignUpNotAllowed
=
errors
.
New
(
"Signup is not allowed for this adapter"
)
ErrTooManyLoginAttempts
=
errors
.
New
(
"Too many consecutive incorrect login attempts for user. Login for user temporarily blocked"
)
ErrPasswordEmpty
=
errors
.
New
(
"No password provided"
)
ErrUsersQuotaReached
=
errors
.
New
(
"Users quota reached"
)
ErrGettingUserQuota
=
errors
.
New
(
"Error getting user quota"
)
ErrUserDisabled
=
errors
.
New
(
"User is disabled"
)
)
...
...
pkg/services/login/errors.go
View file @
58364277
...
...
@@ -3,13 +3,7 @@ package login
import
"errors"
var
(
ErrEmailNotAllowed
=
errors
.
New
(
"Required email domain not fulfilled"
)
ErrInvalidCredentials
=
errors
.
New
(
"Invalid Username or Password"
)
ErrNoEmail
=
errors
.
New
(
"Login provider didn't return an email address"
)
ErrProviderDeniedRequest
=
errors
.
New
(
"Login provider denied login request"
)
ErrSignUpNotAllowed
=
errors
.
New
(
"Signup is not allowed for this adapter"
)
ErrTooManyLoginAttempts
=
errors
.
New
(
"Too many consecutive incorrect login attempts for user. Login for user temporarily blocked"
)
ErrPasswordEmpty
=
errors
.
New
(
"No password provided"
)
ErrUsersQuotaReached
=
errors
.
New
(
"Users quota reached"
)
ErrGettingUserQuota
=
errors
.
New
(
"Error getting user quota"
)
ErrInvalidCredentials
=
errors
.
New
(
"Invalid Username or Password"
)
ErrUsersQuotaReached
=
errors
.
New
(
"Users quota reached"
)
ErrGettingUserQuota
=
errors
.
New
(
"Error getting user quota"
)
)
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