Improve system admin permissions to dms and gms (#29656)
* revert the api4 portion of 57372bd06b
* test: Add system admin channel access tests
* skip a.HasPermissionToTeam for channels without a team
* fix TestPostGetInfo
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
812034f5eb
Коммит
9e01424b15
@@ -214,7 +214,7 @@ func getPostsForChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
if !c.IsSystemAdmin() && !c.App.SessionHasPermissionToReadChannel(c.AppContext, *c.AppContext.Session(), channel) {
|
||||
if !c.App.SessionHasPermissionToReadChannel(c.AppContext, *c.AppContext.Session(), channel) {
|
||||
c.SetPermissionError(model.PermissionReadChannelContent)
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user