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:
Torkel Ödegaard committed 2015-05-19 11:47:14 +02:00
1 parent 788e7fd36d
commit a8aab0cb2b
12 files changed
+169 -47

No files matched your search

+3
View File
@@ -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)
}