diff options
author | Wim <wim@42.be> | 2016-11-12 22:00:53 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2016-11-12 22:00:53 +0100 |
commit | 1d5cd1d7c479c382c9cddaf02f1e59bf55971f12 (patch) | |
tree | abaf22fc41326750e376f0831537bbbbe769d5b2 /vendor/github.com/mattermost/platform/model/session.go | |
parent | 08ebee6b4faf677da159db1cffea292050492fd5 (diff) | |
download | matterbridge-msglm-1d5cd1d7c479c382c9cddaf02f1e59bf55971f12.tar.gz matterbridge-msglm-1d5cd1d7c479c382c9cddaf02f1e59bf55971f12.tar.bz2 matterbridge-msglm-1d5cd1d7c479c382c9cddaf02f1e59bf55971f12.zip |
Sync with mattermost 3.5.0
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/session.go')
-rw-r--r-- | vendor/github.com/mattermost/platform/model/session.go | 6 |
1 files changed, 5 insertions, 1 deletions
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 "[]" |