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
41024c29
Commit
41024c29
authored
Mar 03, 2019
by
Samuel
Committed by
Carl Bergquist
Mar 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return 404 on user not found (#15606)
Return 404 on user not found closes #10506
parent
1e719bb3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
pkg/api/org_invite.go
+4
-4
No files found.
pkg/api/org_invite.go
View file @
41024c29
...
@@ -27,6 +27,10 @@ func GetPendingOrgInvites(c *m.ReqContext) Response {
...
@@ -27,6 +27,10 @@ func GetPendingOrgInvites(c *m.ReqContext) Response {
}
}
func
AddOrgInvite
(
c
*
m
.
ReqContext
,
inviteDto
dtos
.
AddInviteForm
)
Response
{
func
AddOrgInvite
(
c
*
m
.
ReqContext
,
inviteDto
dtos
.
AddInviteForm
)
Response
{
if
setting
.
DisableLoginForm
{
return
Error
(
400
,
"Cannot invite when login is disabled."
,
nil
)
}
if
!
inviteDto
.
Role
.
IsValid
()
{
if
!
inviteDto
.
Role
.
IsValid
()
{
return
Error
(
400
,
"Invalid role specified"
,
nil
)
return
Error
(
400
,
"Invalid role specified"
,
nil
)
}
}
...
@@ -37,10 +41,6 @@ func AddOrgInvite(c *m.ReqContext, inviteDto dtos.AddInviteForm) Response {
...
@@ -37,10 +41,6 @@ func AddOrgInvite(c *m.ReqContext, inviteDto dtos.AddInviteForm) Response {
if
err
!=
m
.
ErrUserNotFound
{
if
err
!=
m
.
ErrUserNotFound
{
return
Error
(
500
,
"Failed to query db for existing user check"
,
err
)
return
Error
(
500
,
"Failed to query db for existing user check"
,
err
)
}
}
if
setting
.
DisableLoginForm
{
return
Error
(
401
,
"User could not be found"
,
nil
)
}
}
else
{
}
else
{
return
inviteExistingUserToOrg
(
c
,
userQuery
.
Result
,
&
inviteDto
)
return
inviteExistingUserToOrg
(
c
,
userQuery
.
Result
,
&
inviteDto
)
}
}
...
...
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