From 66b2ffee6816be80d42cce56f84a238dfa39c6fc Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 29 Jan 2019 07:32:25 +0000 Subject: Support `*` as a channel permission, to give users all access (channel_access.py) --- modules/channel_access.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/channel_access.py b/modules/channel_access.py index f7ba7aae..ce00da0c 100644 --- a/modules/channel_access.py +++ b/modules/channel_access.py @@ -11,10 +11,11 @@ class Module(ModuleManager.BaseModule): "access", []) identified_account = event["user"].get_identified_account() - if not require_access in access or not identified_account: - return "You do not have permission to do this" - else: + if ((require_access in acess or "*" in access) and + identified_account): return utils.consts.PERMISSION_FORCE_SUCCESS + else: + return "You do not have permission to do this" @utils.hook("received.command.access", min_args=1, channel_only=True) def access(self, event): -- cgit v1.3.1-10-gc9f91