Merge pull request #1226 from mattermost/bug-fix

Fixing 200 error bug
Этот коммит содержится в:
Corey Hulen
2015-10-29 00:13:58 -07:00
родитель 8e43a99581 6f599604c9
Коммит 64b617099d
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@@ -320,7 +320,7 @@ func (c *Context) HasSystemAdminPermissions(where string) bool {
return true
}
c.Err = model.NewAppError(where, "You do not have the appropriate permissions", "userId="+c.Session.UserId)
c.Err = model.NewAppError(where, "You do not have the appropriate permissions (system)", "userId="+c.Session.UserId)
c.Err.StatusCode = http.StatusForbidden
return false
}

Просмотреть файл

@@ -653,7 +653,7 @@ func getProfiles(c *Context, w http.ResponseWriter, r *http.Request) {
options := utils.SanitizeOptions
options["passwordupdate"] = false
if c.HasSystemAdminPermissions("getProfiles") {
if c.IsSystemAdmin() {
options["fullname"] = true
options["email"] = true
}