WordPress.org

Ready to get started?Download WordPress

Forums

Remove Dashboard Access
Great plugin... Need to allow Non-admin to upload media (5 posts)

  1. marketcheck06
    Member
    Posted 9 months ago #

    Hi,

    Thanks for niche plugin which does exactly what it promises.

    If this plugin is still supported, could you kindly comment how we can allow non admins to upload media please.

    Detail: using WPUserFrontend plugin, I allow front end post management. When an Admin is logged in 'Upload Media' works well. But non-admins are blocked by 'RDA' to upload media. If 'RDA' is uninstalled then non-admins are again capable to upload media.

    I am sure (hopeful) - a fix exists that allow me to keep this plugin and allow non-admin's access to upload media.

    Any help would be appericiated, I am going live with this in two days pls.

    http://wordpress.org/plugins/remove-dashboard-access-for-non-admins/

  2. Drew Jaynes (DrewAPicture)
    Volunteer Moderator
    Plugin Author

    Posted 9 months ago #

    Hello marketcheck06,

    Can you tell me which role is assigned to the users who can't upload media? I just tested this with a subscriber user and had no problems uploading either Featured Images or attachments with the front-end form.

  3. marketcheck06
    Member
    Posted 9 months ago #

    Thanks a ton for having a look.

    It is an EDITOR role failing to upload media.

    You are right Featured image, upload attachment works. "Add Media" which allows to upload image/other contents goes in trouble.

    Screen failing is most prob this: codex.wordpress.org/Media_Add_New_Screen

    Just for details: I have deactivated all plugins to naratte down that.. if RDA is deactivated, non-admin user is able to upload files without any issue.

    RDA conf is default.. dashboard access is restricted to Administrators.

    Thanks !

  4. Stormcrow85
    Member
    Posted 5 months ago #

    Hi,

    Thanks for the plugin.

    I have the exact same issue with the Author role (Or any non-admin for that matter). I have a front-end post management and image upload, and non-admins cannot upload images. (async-upload.php is getting blocked, thus not allowing to upload images.) I wish there was an option to manually allow certain scrips to run from the front-end. I'm sure many others have the same problem.

    Thank you

  5. Stormcrow85
    Member
    Posted 5 months ago #

    I solved my issue with this. I had to disable the plugin and write my own code.. so i'm not sure this is an appropriate solution for users of this plugin, but nevertheless, i'd thought i'll post it in case it will be of help to somebody someday.

    I took my code from:
    codex.wordpress.org/Plugin_API/Action_Reference/admin_init#Example:_Access_Control_with_redirect

    And added "async-upload.php" to the exclusion. This is my code:

    function restrict_admin_with_redirect() {
    	if ( ! current_user_can( 'manage_options' ) && $_SERVER['PHP_SELF'] != '/wp-admin/admin-ajax.php' && $_SERVER['PHP_SELF'] != '/wp-admin/async-upload.php' ) {
    		wp_redirect( site_url() ); exit;
    	}
    }
    add_action( 'admin_init', 'restrict_admin_with_redirect' );

Reply

You must log in to post.

About this Plugin

About this Topic