1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/data/TWiki/TWikiAccessControlExceptionDotPm.txt Sat Jan 26 15:50:53 2008 +0100
1.3 @@ -0,0 +1,37 @@
1.4 +---+ Package =TWiki::AccessControlException=
1.5 +
1.6 +Exception used raise an access control violation. This exception has the
1.7 +following fields:
1.8 + * =web= - the web which was being accessed
1.9 + * =topic= - the topic being accessed (if any)
1.10 + * =user= - canonical username of the person doing the accessing. Use
1.11 + the methods of the TWiki::Users class to get more information about the
1.12 + user.
1.13 + * =mode= - the access mode e.g. CHANGE, VIEW etc
1.14 + * =reason= a text string giving the reason for the refusal.
1.15 +
1.16 +The exception may be thrown by plugins. If a plugin throws the exception, it
1.17 +will normally be caught and the browser redirected to a login screen (if the
1.18 +user is not logged in) or reported (if they are and just don't have access).
1.19 +
1.20 +
1.21 +%TOC%
1.22 +
1.23 +---++ ClassMethod *new* <tt>($mode,$user,$web,$topic,$reason)</tt>
1.24 +
1.25 + * =$mode= - mode of access (view, change etc)
1.26 + * =$user= - canonical user name of user doing the accessing
1.27 + * =$web= - web being accessed
1.28 + * =$topic= - topic being accessed
1.29 + * =$reason= - string reason for failure
1.30 +
1.31 +All the above fields are accessible from the object in a catch clause
1.32 +in the usual way e.g. =$e->{web}= and =$e->{reason}=
1.33 +
1.34 +
1.35 +
1.36 +---++ ObjectMethod *stringify* <tt>() -> $string</tt>
1.37 +
1.38 +Generate a summary string. This is mainly for debugging.
1.39 +
1.40 +