@@ -320,7 +320,7 @@ func (c *Context) HasSystemAdminPermissions(where string) bool {
|
|||||||
return true
|
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
|
c.Err.StatusCode = http.StatusForbidden
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -653,7 +653,7 @@ func getProfiles(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
options := utils.SanitizeOptions
|
options := utils.SanitizeOptions
|
||||||
options["passwordupdate"] = false
|
options["passwordupdate"] = false
|
||||||
|
|
||||||
if c.HasSystemAdminPermissions("getProfiles") {
|
if c.IsSystemAdmin() {
|
||||||
options["fullname"] = true
|
options["fullname"] = true
|
||||||
options["email"] = true
|
options["email"] = true
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user