Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
foradminonly' - 'true' or 'false' setting using plugin.
Avatar
lattekun #1
Member since Dec 2013 · 62 posts
Group memberships: Members
Show profile · Link to this post
Subject: foradminonly' - 'true' or 'false' setting using plugin.
I want to change 'foradminonly'(in admin plugin) setting
using with plugin(not ftp config).

Are there any plugin to config 'foradminplugin' setting?
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4374 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
You can handle this as you wish by including the method in your plugin and returning true or false based on user or group.
For instance, if you want to grant access to managers and have set @mgr as your manager group:
    function forAdminOnly(){
        global $USERINFO;
        if(in_array('mgr',$USERINFO['grps']))return false;
        return parent::forAdminOnly();       
    }
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
lattekun #3
Member since Dec 2013 · 62 posts
Group memberships: Members
Show profile · Link to this post
I want to use 'query changelog[https://www.dokuwiki.org/plugin:querychangelog]' plugin,
but that plugin work in admin plugin mode, can not access user group permission.

user can access that plugin using this method?

    function forAdminOnly(){
        global $USERINFO;
        if(in_array('mgr',$USERINFO['grps']))return false;
        return parent::forAdminOnly();       
    }
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4374 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
 
function forAdminOnly(){
    
       return false;
        
    }

This should give all users access to that admin.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
lattekun #5
Member since Dec 2013 · 62 posts
Group memberships: Members
Show profile · Link to this post
So, that mean is, config 'manager permission' give to user group?
That plugin`s type is admin plugin.
Avatar
turnermm (Moderator) #6
Member since Oct 2009 · 4374 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
I am not sure now, I may have misunderstood your question..  You will have to test this yourself.  I am not really sure what you mean by query changelog[https://www.dokuwiki.org/plugin:querychangelog]'
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-11-16, 21:41:54 (UTC +01:00)