summaryrefslogtreecommitdiffstats
path: root/api/deprecated.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/deprecated.go')
-rw-r--r--api/deprecated.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/deprecated.go b/api/deprecated.go
index 765c3aac1..9c1d2a4ce 100644
--- a/api/deprecated.go
+++ b/api/deprecated.go
@@ -32,7 +32,8 @@ func InitDeprecated() {
func getMoreChannels(c *Context, w http.ResponseWriter, r *http.Request) {
// user is already in the team
- if !HasPermissionToTeamContext(c, c.TeamId, model.PERMISSION_LIST_TEAM_CHANNELS) {
+ if !app.SessionHasPermissionToTeam(c.Session, c.TeamId, model.PERMISSION_LIST_TEAM_CHANNELS) {
+ c.SetPermissionError(model.PERMISSION_LIST_TEAM_CHANNELS)
return
}