MM-42271: Restrict support packet generation to system admin. (#19726)
Этот коммит содержится в:
@@ -81,10 +81,9 @@ func generateSupportPacket(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Checking to see if the user is a admin of any sort or not
|
||||
// If they are a admin, they should theoretically have access to one or more of the system console read permissions
|
||||
if !c.App.SessionHasPermissionToAny(*c.AppContext.Session(), model.SysconsoleReadPermissions) {
|
||||
c.SetPermissionError(model.SysconsoleReadPermissions...)
|
||||
// Support packet generation is limited to system admins (MM-42271).
|
||||
if !c.App.SessionHasPermissionTo(*c.AppContext.Session(), model.PermissionManageSystem) {
|
||||
c.SetPermissionError(model.PermissionManageSystem)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user