moelski How to add a proper name to that new entry?
Put following entry in following file (create if it doesn't exist yet): /dokuwiki/conf/lang/en/lang.php
:
<?php
/**
* Customization of the en language file
* Copy only strings from /dokuwiki/inc/lang/en/lang.php which you will modify.
* The remaining strings are read from the original file.
*/
$lang['btn_acl'] = 'Permissions';
Again, watch out, no spaces are allowed at the beginning of the first line (before the <?php
) in the actuall php file.
moelski Is it possible to hide the Icon when the user has no right to access the ACL?
Yes, I was wondering that myself. Let me think about that. BTW, only admis have the right to access the ACL, so this button will be mostly for you. I will try this with javascript.
UPDATE 2: Sorry, it wasn't actually all that easy, but the following method works! Therefore, you clone the /dokuwiki/inc/Menu/PageMenu.php
file. So duplicate this file (in the same directory) and rename the clone to PageMenuACL.php
. And also change the class name inside the code to class PageMenuACL
, like so:
class PageMenuACL extends AbstractMenu
{
protected $view = 'page';
protected $types = ['Edit', 'Revert', 'Revisions', 'Backlink', 'Subscribe', 'ACL', 'Top'];
}
... and put the ACL in the list, where you want to have it. Now, you can address one of the two different PageMenu variants to be loaded in your template depending on user credentials. This goes something like this:
if (file_exists(DOKU_INC . '/inc/Menu/PageMenuACL.php') && ( $_SERVER['REMOTE_USER'] == 'admin' || $_SERVER['REMOTE_USER'] == 'coadmin' ) ) {
echo (new \dokuwiki\Menu\PageMenuACL())->getListItems();
} else {
echo (new \dokuwiki\Menu\PageMenu())->getListItems();
}
For admin
paste in your username (in the code above). This is not a group name of the admin group, it's just your individual username. If you have another person with admin privileges in your wiki, add the person's username to the condition above for coadmin
, so that this person can also see the ACL button.
Now, the button should appear only when you're logged in.
Cheers!