From 2e80b223de84d93716baae2ba0ea1a0ec7070686 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 26 Sep 2019 12:14:55 +0100 Subject: allow all preprocess.command and check.command failures to have a message --- modules/check_mode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/check_mode.py') diff --git a/modules/check_mode.py b/modules/check_mode.py index 67d48172..9fe3f464 100644 --- a/modules/check_mode.py +++ b/modules/check_mode.py @@ -21,9 +21,10 @@ class Module(ModuleManager.BaseModule): if not event["target"].mode_or_above(event["user"], require_mode): - return "You do not have permission to do this" + return (utils.consts.PERMISSION_ERROR, + "You do not have permission to do this") else: - return utils.consts.PERMISSION_FORCE_SUCCESS + return utils.consts.PERMISSION_FORCE_SUCCESS, None @utils.hook("preprocess.command") def preprocess_command(self, event): -- cgit v1.3.1-10-gc9f91