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
35c67606
Unverified
Commit
35c67606
authored
Jul 31, 2020
by
Arve Knudsen
Committed by
GitHub
Jul 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: Use errors.Is for comparing errors (#26719)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent
16c185c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
pkg/services/login/login.go
+3
-3
No files found.
pkg/services/login/login.go
View file @
35c67606
...
...
@@ -42,7 +42,7 @@ func (ls *LoginService) UpsertUser(cmd *models.UpsertUserCommand) error {
}
if
err
:=
bus
.
Dispatch
(
userQuery
);
err
!=
nil
{
if
err
!=
models
.
ErrUserNotFound
{
if
!
errors
.
Is
(
err
,
models
.
ErrUserNotFound
)
{
return
err
}
if
!
cmd
.
SignupAllowed
{
...
...
@@ -114,7 +114,7 @@ func (ls *LoginService) UpsertUser(cmd *models.UpsertUserCommand) error {
User
:
cmd
.
Result
,
ExternalUser
:
extUser
,
})
if
err
!=
nil
&&
err
!=
bus
.
ErrHandlerNotFound
{
if
err
!=
nil
&&
!
errors
.
Is
(
err
,
bus
.
ErrHandlerNotFound
)
{
return
err
}
...
...
@@ -223,7 +223,7 @@ func syncOrgRoles(user *models.User, extUser *models.ExternalUserInfo) error {
// add role
cmd
:=
&
models
.
AddOrgUserCommand
{
UserId
:
user
.
Id
,
Role
:
orgRole
,
OrgId
:
orgId
}
err
:=
bus
.
Dispatch
(
cmd
)
if
err
!=
nil
&&
err
!=
models
.
ErrOrgNotFound
{
if
err
!=
nil
&&
!
errors
.
Is
(
err
,
models
.
ErrOrgNotFound
)
{
return
err
}
}
...
...
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