| Since: TWiki::Plugins::VERSION 1.000 (27 Feb 2001) | |
< < | checkAccessPermission( $type, $wikiName, $text, $topic, $web ) -> $boolean | > > | checkAccessPermission( $type, $wikiName, $text, $topic, $web, $meta ) -> $boolean | | | |
< < | Check access permission for a topic based on the TWiki.TWikiAccessControl rules
-
$type - Access type, e.g. 'VIEW' , 'CHANGE' , 'CREATE'
-
$wikiName - WikiName of remote user, e.g. "PeterThoeny" . If $wikiName is '', 0 or undef then access is always permitted.
-
$text - Topic text, optional. If 'perl false' (undef, 0 or ''), topic $web.$topic is consulted
| > > | Check access permission for a topic based on the
TWiki.TWikiAccessControl rules
-
$type - Access type, required, e.g. 'VIEW' , 'CHANGE' .
-
$wikiName - WikiName of remote user, required, e.g. "PeterThoeny" . If $wikiName is '', 0 or undef then access is always permitted.
-
$text - Topic text, optional. If 'perl false' (undef, 0 or ''), topic $web.$topic is consulted. $text may optionally contain embedded %META:PREFERENCE tags. Provide this parameter if:
- You are setting different access controls in the text to those defined in the stored topic,
- You already have the topic text in hand, and want to help TWiki avoid having to read it again,
- You are providing a
$meta parameter.
| |
-
$topic - Topic name, required, e.g. 'PrivateStuff'
-
$web - Web name, required, e.g. 'Sandbox'
| |
> > |
-
$meta - Meta-data object, as returned by readTopic . Optional. If undef , but $text is defined, then access controls will be parsed from $text . If defined, then metadata embedded in $text will be ignored. This parameter is always ignored if $text is undefined. Settings in $meta override Set settings in $text.
| | A perl true result indicates that access is permitted. | |
> > | Note the wierd parameter order is due to compatibility constraints with
earlier TWiki releases.
Tip if you want, you can use this method to check your own access control types. For example, if you:
- Set ALLOWTOPICSPIN = IncyWincy?
in ThatWeb.ThisTopic , then a call to checkAccessPermissions('SPIN', 'IncyWincy', undef, 'ThisTopic', 'ThatWeb', undef) will return true . | | Since: TWiki::Plugins::VERSION 1.000 (27 Feb 2001) |
|