comparison mod_adhoc/adhoc/adhoc.lib.lua @ 43:adc9eff8adb2

mod_adhoc, mod_adhoc_cmd_admin: Show only commands they may execute to the user
author Florian Zeitz <florob@babelmonkeys.de>
date Fri, 16 Oct 2009 01:36:04 +0200
parents 58d326d86a9a
children a9898f13c89e
comparison
equal deleted inserted replaced
42:bbb3d3a90a70 43:adc9eff8adb2
10 if action then cmd.attr.action = action; end 10 if action then cmd.attr.action = action; end
11 11
12 return cmd; 12 return cmd;
13 end 13 end
14 14
15 function _M.new(name, node, handler) 15 function _M.new(name, node, handler, permission)
16 return { name = name, node = node, handler = handler, cmdtag = _cmdtag }; 16 return { name = name, node = node, handler = handler, cmdtag = _cmdtag, permission = (permission or "user") };
17 end 17 end
18 18
19 return _M; 19 return _M;