diff options
| author | 2019-01-29 15:35:38 +0000 | |
|---|---|---|
| committer | 2019-01-29 15:35:38 +0000 | |
| commit | 249734ebef40660c3199bd4fe7604a720c7d4ab0 (patch) | |
| tree | d821abe4b519ffbc7e8eb4144bce0d78645eb219 | |
| parent | Seperate out access checking logic so we can call across-modules with the event (diff) | |
| signature | ||
We don't have an event object in `_has_channel_access` (channel_access.py)
| -rw-r--r-- | modules/channel_access.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/channel_access.py b/modules/channel_access.py index 0c5e07da..72c8cad5 100644 --- a/modules/channel_access.py +++ b/modules/channel_access.py @@ -4,9 +4,8 @@ class Module(ModuleManager.BaseModule): _name = "ChanAccess" def _has_channel_access(self, target, user, require_access): - access = event["target"].get_user_setting(event["user"].get_id(), - "access", []) - identified_account = event["user"].get_identified_account() + access = target.get_user_setting(user.get_id(), "access", []) + identified_account = user.get_identified_account() return ((require_access in access or "*" in access ) and identified_account) |
