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