From 1d5cd1d7c479c382c9cddaf02f1e59bf55971f12 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 12 Nov 2016 22:00:53 +0100 Subject: Sync with mattermost 3.5.0 --- vendor/github.com/mattermost/platform/model/session.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/mattermost/platform/model/session.go') diff --git a/vendor/github.com/mattermost/platform/model/session.go b/vendor/github.com/mattermost/platform/model/session.go index e8b04fbe..a6a753e7 100644 --- a/vendor/github.com/mattermost/platform/model/session.go +++ b/vendor/github.com/mattermost/platform/model/session.go @@ -11,7 +11,7 @@ import ( const ( SESSION_COOKIE_TOKEN = "MMAUTHTOKEN" - SESSION_CACHE_SIZE = 10000 + SESSION_CACHE_SIZE = 25000 SESSION_PROP_PLATFORM = "platform" SESSION_PROP_OS = "os" SESSION_PROP_BROWSER = "browser" @@ -115,6 +115,10 @@ func (me *Session) IsMobileApp() bool { (strings.HasPrefix(me.DeviceId, PUSH_NOTIFY_APPLE+":") || strings.HasPrefix(me.DeviceId, PUSH_NOTIFY_ANDROID+":")) } +func (me *Session) GetUserRoles() []string { + return strings.Fields(me.Roles) +} + func SessionsToJson(o []*Session) string { if b, err := json.Marshal(o); err != nil { return "[]" -- cgit v1.2.3