[pmwiki-users] Condition Names.

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 7 20:10:50 CST 2007


On Wed, Nov 07, 2007 at 08:23:32PM -0500, Stirling Westrup wrote:
> I've just checked, and there is currently no (:if action:) test in the core to
> see if one has permission to perform a given action.
> 
> See a recent discussion here with PM about how (:if auth:) doesn't quite do
> that, as it ignores the $HandleAuth array.
> 
> It shouldn't be too hard to add such a test, but what should it be called? The
> reason I ask is that I already have a custom (:if action:) test which instead
> checks to see what the current value of $action is.
> 
> They can't both have the same name, so what should I call them? I'm currently
> thinking:
> 
>   (:if authact ...:) to see if an action is authorized
>   (:if action ...:) to see what the current action is.

In the past we've discussed that (:if action ...:) would be true
if someone is permitted to perform a particular action.  We could
change it to (:if authact ...:), however.

The "normal" way to test for the current action is

   (:if equal {$Action} ... :)

Pm



More information about the pmwiki-users mailing list