Worked on user administration page, a grafana server admin can now add and edit organization roles for any user, #2014
This commit is contained in:
1 parent
788e7fd36d
commit
a8aab0cb2b
12 files changed
+169
-47
No files matched your search
@@ -84,6 +84,9 @@ func updateOrgUserHelper(cmd m.UpdateOrgUserCommand) Response {
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
if err == m.ErrLastOrgAdmin {
|
||||
return ApiError(400, "Cannot change role so that there is no organization admin left", nil)
|
||||
}
|
||||
return ApiError(500, "Failed update org user", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user