DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:adminperm

This is an old revision of the document!


adminperm Plugin

Compatible with DokuWiki

Devel only

plugin Override Access to admin plugins

Last updated on
2018-11-19
Provides
Admin, Action
Repository
Source

Tagged with acl, admin, permissions

This plugin allows you to give access to admin and manager plugins to users and groups without making them admins or managers.

Installation

A CosmoCode Plugin

:!: this plugin uses develonly features and does not work with a current stable release.

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Usage

After installing, a new menu entry “Admin Plugin Access Overrides” is available in the Admin menu. It lists all installed plugins with an admin component. The default access is given in brackets (A = admin only, M = manager access).

For each plugin you can configure a comma separated list of users and groups that also should have access to the plugin's feature.

:!: Plugins may not expect that they are run by unprivileged users. Giving access to them may lead to privilege escalations and unforeseen side effects. You should only grant access to people you trust.

Plugin Support

The plugin only grants access to the admin component of a plugin. Often plugins also contain other component types (for example an action component to handle AJAX requests). These component usually do their own permission checks. To be compatible with this plugin, they need to be updated to make use of the new isAccessibleByCurrentUser() method.

Example:

A plugin might use this check in it's AJAX handling:

if(!auth_isadmin()) {
    echo 'for admins only';
    return;
}

This needs to be changed to use the admin components' method instead:

/** @var $admin admin_plugin_myplugin */
$admin = plugin_load('admin', 'myplugin');
if(!$admin->isAccessibleByCurrentUser()) {
    echo 'for admins only';
    return;
}
plugin/adminperm.1544482208.txt.gz · Last modified: 2018-12-10 23:50 by andi