Support * as a channel permission, to give users all access

(channel_access.py)
This commit is contained in:
jesopo 2019-01-29 07:32:25 +00:00
parent 5e5a62044c
commit 66b2ffee68

View file

@ -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):