summaryrefslogtreecommitdiffstats
path: root/api/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/file.go')
-rw-r--r--api/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/file.go b/api/file.go
index 92bceaa80..5b08804da 100644
--- a/api/file.go
+++ b/api/file.go
@@ -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
}