[dokuwiki] Authentication group membership in Action Plugin

Hello,

I'm trying to make an actiopn plugin to add <ifauth @group>text</ifauth>
in the editing text. Clicking on the edit-button the action plugin has
to pop=up with all (or a defined subset) from the current user
privileges which with a click result in id the requested text filled in
with the chosen group.

In general the plugin works in the discussion-plugin text erea but when
editing a page the list of groups turns out to be empty...

I'm using the variable $USERINFO['grps'] to make the list of groups,
here an little piece of the code:

  function add_button(&$event, $param) {
    global $USERINFO;
    $user = auth_nameencode($_SERVER['REMOTE_USER']);
    $groups = $USERINFO['grps'];

    //prepend groups with @
    $cnt = count($groups);
    for($i=0; $i<$cnt; $i++) $groups[$i] = '@'.$groups[$i];

    //add specials
    $groups[] = '@ALL';
    $groups[] = $user;

    ....

As said, in de discusion plugin the array $groups is filled as expected,
in the page-editor only '@ALL' and 'username' are available.

How can this be solved?

Kind regards, Luitzen van Gorkum


**********************************************************************
Disclaimer

Dit bericht kan informatie bevatten die niet voor u is bestemd.
Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is
toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te
verwijderen.
De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die
verband houdt met risico's verbonden aan het elektronisch verzenden van 
berichten.

This message may contain information that is not intended for you.
If you are not the addressee or if this message was sent to you by mistake, you 
are
requested to inform the sender and delete the message.
The State accepts no liability for damage of any kind resulting from the risks
inherent in the electronic transmission of messages.

Ministerie van Veiligheid en Justitie.
**********************************************************************


--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts:

  • » [dokuwiki] Authentication group membership in Action Plugin - Gorkum, L. van (Luitzen)