|
|
@@ -257,7 +257,7 @@ func IsAdmin(ctx *context.APIContext) { |
|
|
|
userName := ctx.Query("user") |
|
|
|
user, err := models.GetUserByName(userName) |
|
|
|
if err != nil { |
|
|
|
ctx.JSON(http.StatusOK, response.ServerError("User not exists")) |
|
|
|
ctx.JSON(http.StatusOK, response.OuterServerError("User not exists")) |
|
|
|
return |
|
|
|
} |
|
|
|
isAdmin := role.UserHasRole(user.ID, models.TechProgramAdmin) |
|
|
|