Fixed permissions when getting a file attachment to use the correct user id (#3535)

Этот коммит содержится в:
Harrison Healey
2016-07-08 17:03:28 -04:00
коммит произвёл GitHub
родитель 968e8b04e1
Коммит 2d1c0924ee

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

@@ -356,7 +356,7 @@ func getFile(c *Context, w http.ResponseWriter, r *http.Request) {
userId := params["user_id"]
filename := params["filename"]
if !c.HasPermissionsToChannel(Srv.Store.Channel().CheckPermissionsTo(teamId, channelId, userId), "getFile") {
if !c.HasPermissionsToChannel(Srv.Store.Channel().CheckPermissionsTo(teamId, channelId, c.Session.UserId), "getFile") {
return
}