PurpleWiki::ACL - Access control list.
use PurpleWiki::ACL; my $acl = PurpleWiki::ACL->new; if ($acl->canEdit($user, $pageId)) { # let the user edit the page } else { # return error message }
Access control list for PurpleWiki. Currently, always returns true for canRead and false for canAdmin. If LoginToEdit is true in the config file, then will require the user to be logged in for canEdit to return true.
This can easily be subclassed for more sophisticated ACL schemes.
Constructor.
Always returns true.
If LoginToEdit is set, only returns true if user object is defined (i.e. user is logged in).
Also checks to see if IP address/hostname is on the banlist.
Always returns false.
Eugene Eric Kim, <eekim@blueoxen.org>
To install PurpleWiki::ACL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PurpleWiki::ACL
CPAN shell
perl -MCPAN -e shell install PurpleWiki::ACL
For more information on module installation, please visit the detailed CPAN module installation guide.