From e9c9688b343049c6d461260bd15fff3486238f92 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 23 Jan 2017 08:12:05 -0500 Subject: Move permissions code into app package (#5146) * Move permissions code into app package * Revert getPosts permission --- api/deprecated.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api/deprecated.go') 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 } -- cgit v1.2.3-1-g7c22