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