|
Cookbook /
RestrictActionsSummary: require admin privilege for most actions (if not defined otherwise).
Version: 1.5
Prerequisites: none
Status: stable
Maintainer: Sven
Categories: Security
Discussion: RestrictActions-Talk
Questions answered by this recipe
DescriptionThis recipe prevents all actions that are not configured to be allowed. (Some are allowed by default.) How to Install1. Download restrict_actions_v1.6.phpΔ and save it in your cookbook directory. 2. Edit your local config file and set the permissions by adding lines like: SDVA($RequiredPermissionLevels, array(
'action1' => 'userlevel1',
'action2' => 'userlevel2',
...
'actionN' => 'userlevelN',
));
where the actions are the ?action= values you want to allow and the userlevels are either
"*" means do not add any extra protection, "-" means disable the action completely (even for users with admin privilege).
3. Below these permissions, write the usual include code: require_once "
where X.X is the version number. If you're using AuthUser, include that before you include restrict_actions. Security and Privacy ReminderSince v1.6, Restirct Actions is more paranoid by default, so it changes forbidden actions to login. (Until 1.6, it changed them to browse). If you want to allow reading protected pages, find the two occurences of CommentsSee Discussion at RestrictActions-Talk. Releases
Reminders
See AlsoContributors
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |