diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-30 14:52:51 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-30 14:52:51 -0400 |
commit | e99e93fafbb6c974129ba09a35ddb85e2102f00d (patch) | |
tree | 6836aebf1b99083a501c4c3305326237625ceb3a /model | |
parent | 6a9cfe2f241f0eed8d6b2c943a8fd04cc1a14019 (diff) | |
parent | 7d31f3a271d933b8c276602d9fb77fd5d22055de (diff) | |
download | chat-e99e93fafbb6c974129ba09a35ddb85e2102f00d.tar.gz chat-e99e93fafbb6c974129ba09a35ddb85e2102f00d.tar.bz2 chat-e99e93fafbb6c974129ba09a35ddb85e2102f00d.zip |
Merge pull request #884 from mattermost/permissions-fix
Permissions fixes. Fixes PLT-487
Diffstat (limited to 'model')
-rw-r--r-- | model/user.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/model/user.go b/model/user.go index 5cb774478..d8000a7e2 100644 --- a/model/user.go +++ b/model/user.go @@ -304,10 +304,14 @@ func isValidRole(role string) bool { return false } +// Make sure you acually want to use this function. In context.go there are functions to check permssions +// This function should not be used to check permissions. func (u *User) IsInRole(inRole string) bool { return IsInRole(u.Roles, inRole) } +// Make sure you acually want to use this function. In context.go there are functions to check permssions +// This function should not be used to check permissions. func IsInRole(userRoles string, inRole string) bool { roles := strings.Split(userRoles, " ") |