data/TWiki/TWikiAccessControlExceptionDotPm.txt,v
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
     1 head	1.2;
     2 access;
     3 symbols;
     4 locks; strict;
     5 comment	@# @;
     6 
     7 
     8 1.2
     9 date	2008.01.22.03.21.26;	author TWikiContributor;	state Exp;
    10 branches;
    11 next	1.1;
    12 
    13 1.1
    14 date	2006.02.01.12.01.24;	author TWikiContributor;	state Exp;
    15 branches;
    16 next	;
    17 
    18 
    19 desc
    20 @new-topic
    21 @
    22 
    23 
    24 1.2
    25 log
    26 @buildrelease
    27 @
    28 text
    29 @---+ Package =TWiki::AccessControlException=
    30 
    31 Exception used raise an access control violation. This exception has the
    32 following fields:
    33    * =web= - the web which was being accessed
    34    * =topic= - the topic being accessed (if any)
    35    * =user= - canonical username of the person doing the accessing. Use
    36    the methods of the TWiki::Users class to get more information about the
    37    user.
    38    * =mode= - the access mode e.g. CHANGE, VIEW etc
    39    * =reason= a text string giving the reason for the refusal.
    40 
    41 The exception may be thrown by plugins. If a plugin throws the exception, it
    42 will normally be caught and the browser redirected to a login screen (if the
    43 user is not logged in) or reported (if they are and just don't have access).
    44 
    45 
    46 %TOC%
    47 
    48 ---++ ClassMethod *new* <tt>($mode,$user,$web,$topic,$reason)</tt>
    49 
    50    * =$mode= - mode of access (view, change etc)
    51    * =$user= - canonical user name of user doing the accessing
    52    * =$web= - web being accessed
    53    * =$topic= - topic being accessed
    54    * =$reason= - string reason for failure
    55 
    56 All the above fields are accessible from the object in a catch clause
    57 in the usual way e.g. =$e->{web}= and =$e->{reason}=
    58 
    59 
    60 
    61 ---++ ObjectMethod *stringify* <tt>() -> $string</tt>
    62 
    63 Generate a summary string. This is mainly for debugging.
    64 
    65 
    66 @
    67 
    68 
    69 1.1
    70 log
    71 @buildrelease
    72 @
    73 text
    74 @a1 1
    75 *extends* <tt>Error</tt>
    76 d3 13
    77 a15 2
    78 
    79 Exception used raise an access control violation.
    80 d23 1
    81 a23 1
    82    * =$user= - user object doing the accessing
    83 d35 1
    84 a35 1
    85 Generate a summary string
    86 @