NAME
WWW::MenuGrinder::Plugin::RequirePrivilege - WWW::MenuGrinder plugin that does privilege checks on items.
VERSION
version 0.04
DESCRIPTION
WWW::MenuGrinder::Plugin::RequirePrivilege
is a plugin for WWW::MenuGrinder
. You should not use it directly, but include it in the plugins
section of a WWW::MenuGrinder
config.
When loaded, this plugin will remove any menu item containing a need_priv
key identifying a privilege that's not available to the current request's user, and all of that item's children.
Configuration
None.
Required Methods
In order to load this plugin your WWW::MenuGrinder
subclass must implement the method has_priv
, which receives a privilege name as a string and returns true or false indicating whether the privilege check was successful.
AUTHOR
Andrew Rodland <andrew@hbslabs.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by HBS Labs, LLC..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.