diff options
author | Matthew Wild <mwild1@gmail.com> | 2023-03-26 14:06:04 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2023-03-26 14:06:04 +0100 |
commit | eb45f0fcf8c049c9c78c7d4dd967866baf47f043 (patch) | |
tree | c57303398f4d3ea9c7ba6cbec5fea3afeb75fe57 /net/http/codes.lua | |
parent | 6b2d191b939099b598e7edaf972994c94a24ff0e (diff) | |
download | prosody-eb45f0fcf8c049c9c78c7d4dd967866baf47f043.tar.gz prosody-eb45f0fcf8c049c9c78c7d4dd967866baf47f043.zip |
moduleapi: Add 'peek' to :may() and new :could() helper to suppress logging
The current method logs scary "access denied" messages on failure - this is
generally very useful when debugging access control stuff, but in some cases
the call is simply a check to see if someone *could* perform an action, even
if they haven't requested it yet. One example is determining whether to show
the user as an admin in disco.
The 'peek' parameter, if true, will suppress such logging.
The :could() method is just a simple helper that can make the calling code a
bit more readable (suggested by Zash).
Diffstat (limited to 'net/http/codes.lua')
0 files changed, 0 insertions, 0 deletions