diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-09-26 13:41:50 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-09-26 13:41:50 -0400 |
commit | 667db6e10c7bf4d3856a1f94eaad34d9e03352c1 (patch) | |
tree | 44fa38e30a277a11acc51453f1399aa21983e8f8 /api/web_hub.go | |
parent | 7fcc004beb9f6ef022f755e8e2f2a958c976c637 (diff) | |
download | chat-667db6e10c7bf4d3856a1f94eaad34d9e03352c1.tar.gz chat-667db6e10c7bf4d3856a1f94eaad34d9e03352c1.tar.bz2 chat-667db6e10c7bf4d3856a1f94eaad34d9e03352c1.zip |
Cleaning up some old code from the permissions system change (#4090)
Diffstat (limited to 'api/web_hub.go')
-rw-r--r-- | api/web_hub.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/api/web_hub.go b/api/web_hub.go index 309d560a9..18c218634 100644 --- a/api/web_hub.go +++ b/api/web_hub.go @@ -5,6 +5,7 @@ package api import ( "fmt" + l4g "github.com/alecthomas/log4go" "github.com/mattermost/platform/einterfaces" @@ -154,7 +155,7 @@ func shouldSendEvent(webCon *WebConn, msg *model.WebSocketEvent) bool { // We have to make sure the user is in the channel. Otherwise system messages that // post about users in channels they are not in trigger warnings. if len(msg.ChannelId) > 0 { - allowed := webCon.HasPermissionsToChannel(msg.ChannelId) + allowed := webCon.IsMemberOfChannel(msg.ChannelId) if !allowed { return false @@ -176,7 +177,7 @@ func shouldSendEvent(webCon *WebConn, msg *model.WebSocketEvent) bool { // Only report events to users who are in the team for the event if len(msg.TeamId) > 0 { - allowed := webCon.HasPermissionsToTeam(msg.TeamId) + allowed := webCon.IsMemberOfTeam(msg.TeamId) if !allowed { return false @@ -185,7 +186,7 @@ func shouldSendEvent(webCon *WebConn, msg *model.WebSocketEvent) bool { // Only report events to users who are in the channel for the event execept deleted events if len(msg.ChannelId) > 0 && msg.Event != model.WEBSOCKET_EVENT_CHANNEL_DELETED { - allowed := webCon.HasPermissionsToChannel(msg.ChannelId) + allowed := webCon.IsMemberOfChannel(msg.ChannelId) if !allowed { return false |