Forums

IP Filter
Allow access tp authors (6 posts)

  1. devpaq
    Member
    Posted 6 months ago #

    Is there a way I can allow users with a status of author to add IPs to block? I want to give access to the authors to add IPs but don't want to give them administrative rights.

    http://wordpress.org/extend/plugins/ip-filter/

  2. GabSoftware
    Member
    Posted 5 months ago #

    Currently, you will need to edit the file ipfilter.php and change the line 95:

    if( current_user_can( 'manage_options' ) )

    By:

    if( current_user_can( 'publish_posts' ) )

    And then Authors should be able to modify the list.

  3. devpaq
    Member
    Posted 5 months ago #

    Thanks, Gab
    I modified that line as well as the few other times it checks for the user type. Now it lets me see the page but if I try to save the changes (which goes to options.php) I get the "cheatin' uh?" message.

  4. GabSoftware
    Member
    Posted 5 months ago #

    Which lines do you modified exactly?

  5. devpaq
    Member
    Posted 5 months ago #

    I modified the one you mentioned which is around line 89

    Line 184
    if( current_user_can( 'manage_options' ) )

    Line 279 under
    $ipfilter_options_page_handle = add_submenu_page(

    Line 304
    if ( ! current_user_can( 'manage_options' ) )

    All of them I replaced "manage_options" with "publish_posts"

    I tried searching the forums, but there seems the "cheatin" message is so general.

  6. GabSoftware
    Member
    Posted 5 months ago #

    I think the problem is that publishers can't access the Settings section, only admins can.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags