From 4491b5ecdfad96959f9a9ab32a5f127bbfa7eac5 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 25 Oct 2017 11:48:15 -0700 Subject: Performance improvements for 40M posts (#7708) * Optimizing get root posts SQL query * Setting session invalidation to be reliable * Adding app reciever to SessionHasPermissionToUser * Adding app reciever to SessionHasPermissionToTeam * Adding app reciever to SessionHasPermissionTo * Clear session cache if permission was denied * Fixing rebase issues * Revert "Optimizing get root posts SQL query" This reverts commit f364757e7015cfb4ec673d0a4fc3d57cd25d8dd7. * Fixing build --- api4/cluster.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'api4/cluster.go') diff --git a/api4/cluster.go b/api4/cluster.go index f79ef28a8..472b52f36 100644 --- a/api4/cluster.go +++ b/api4/cluster.go @@ -7,7 +7,6 @@ import ( "net/http" l4g "github.com/alecthomas/log4go" - "github.com/mattermost/mattermost-server/app" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" ) @@ -19,7 +18,7 @@ func (api *API) InitCluster() { } func getClusterStatus(c *Context, w http.ResponseWriter, r *http.Request) { - if !app.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) { + if !c.App.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) { c.SetPermissionError(model.PERMISSION_MANAGE_SYSTEM) return } -- cgit v1.2.3-1-g7c22