data/TWiki/TWikiAccessControlExceptionDotPm.txt
changeset 0 414e01d06fd5
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 ---+ Package =TWiki::AccessControlException=
       
     2 
       
     3 Exception used raise an access control violation. This exception has the
       
     4 following fields:
       
     5    * =web= - the web which was being accessed
       
     6    * =topic= - the topic being accessed (if any)
       
     7    * =user= - canonical username of the person doing the accessing. Use
       
     8    the methods of the TWiki::Users class to get more information about the
       
     9    user.
       
    10    * =mode= - the access mode e.g. CHANGE, VIEW etc
       
    11    * =reason= a text string giving the reason for the refusal.
       
    12 
       
    13 The exception may be thrown by plugins. If a plugin throws the exception, it
       
    14 will normally be caught and the browser redirected to a login screen (if the
       
    15 user is not logged in) or reported (if they are and just don't have access).
       
    16 
       
    17 
       
    18 %TOC%
       
    19 
       
    20 ---++ ClassMethod *new* <tt>($mode,$user,$web,$topic,$reason)</tt>
       
    21 
       
    22    * =$mode= - mode of access (view, change etc)
       
    23    * =$user= - canonical user name of user doing the accessing
       
    24    * =$web= - web being accessed
       
    25    * =$topic= - topic being accessed
       
    26    * =$reason= - string reason for failure
       
    27 
       
    28 All the above fields are accessible from the object in a catch clause
       
    29 in the usual way e.g. =$e->{web}= and =$e->{reason}=
       
    30 
       
    31 
       
    32 
       
    33 ---++ ObjectMethod *stringify* <tt>() -> $string</tt>
       
    34 
       
    35 Generate a summary string. This is mainly for debugging.
       
    36 
       
    37