WordPress.org

Ready to get started?Download WordPress

Forums

amr users
[Plugin: AmR Users] What "role capability" is needed to be able to export CSV? (5 posts)

  1. DougJoseph
    Member
    Posted 3 years ago #

    Hi anmari.

    I am so glad to have your excellent plugin working. Thank you!

    One question: What "role capability" is needed to be able to export CSV?

    For instance, should a subscriber be able to export? Or only a contributor? Or higher?

    If I wanted to change this, where in the plugin's code would I go?

    I created a custom role, and gave it the "list_users" capability. It can access the list (view it). But when I try to export CSV with it, I get taken to a generic view of the dashboard at this location:

    /wp-admin/?c=1

    Thanks again for such a great plugin!

    http://wordpress.org/extend/plugins/amr-users/

  2. anmari
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Doug,
    I had a bit of a look and I think improved wp security has possible caused this bug.

    I did not get exactly your problem. I used an editor with 'list_users' and got the dreaded
    "you do not have permission to access this page" bug - 'tis one that has caused people many debug problems.

    I think it is because the csv php code is in a file that is in a options page, so wp probably does not like a non-admin linking there. the link is something like http://localhost/wpbeta/wp/wp-admin/options-general.php?page=ameta-admin.php&csv=1&_wpnonce=4ea77067f5 (CSV was originally just an admin thing)

    So either the user needs "manage_options" - yuck do not do that ,
    or the code has to be relocated and the csv link changed.

    I cannot work on it this weekend but am planning an update after testing against wp 3.1, so maybe a few days later? Unless someone else feels like diving into the code...

  3. DougJoseph
    Member
    Posted 3 years ago #

    Thanks for the excellent explanation and for the offer to hopefully work on it some more! You are great!

  4. anmari
    Member
    Plugin Author

    Posted 3 years ago #

    Hi DougJospeh, life has got busy and it will be a while (few weeks? ) before I get back to this

  5. DougJoseph
    Member
    Posted 3 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic