• Resolved csebe

    (@csebe)


    Hi guys,

    Thanks for this plugin, I find it quite useful!

    I have the following problem:
    If I log in as WP administrator, I can use the “Configure file protection” link (in the list view of Media Library) and do things as expected.
    However, logged in as an editor, when clicking the “Configure file protection” link, the popup overlay appears and says “Loading data…” forever.

    Disabled cache (WP fastest Cache plugin) and re-enabled the WP API access (managed by Wordfence) but no difference.
    Couldn’t find any option to configure a “usage” permission particularly for this plugin; also, the “Members” plugin has permissions defined only for plugins’ management (add, activate,…) but not for “usage”.

    Any idea?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Muhammad

    (@muhammadwpfolio)

    Hi @csebe,

    Thanks for the details!

    We tried reproducing the issue by logging in as an Editor on our test site, but the “Configure file protection” popup worked as expected — it didn’t get stuck on “Loading data…”

    It might be a site-specific issue. If possible, could you check the browser console for any errors when the popup hangs? That would help us narrow it down further.

    Let us know what you find!

    Thread Starter csebe

    (@csebe)

    Hi @muhammadwpfolio,

    Thank you for your fast answer!
    It is indeed a local problem; following your suggestion I have looked at the Requests/Responses in browser console and:

    GET https://…/wp-json/pda-lite/v1/files/3484
    fails with:
    rest_forbidden, “Sorry, you are not allowed to do that.”

    So, it looks it’s API permission issue (due to some plugin; I played with a couple today, in order to secure the API).

    Apologizes for the waste of time on your side!

    Best regards!

    Plugin Support Muhammad

    (@muhammadwpfolio)

    Hi @csebe,

    No worries at all, we’re just glad you were able to pinpoint the issue!

    Thanks for checking the console and confirming it’s related to API permissions. Some security plugins can indeed restrict REST API access for certain roles, which would explain the “rest_forbidden” response for Editors.

    If you need further, feel free to let us know — happy to assist further!

    Thread Starter csebe

    (@csebe)

    Found the problem and thought it might be useful to someone:

    If you use both “Prevent Direct Access (PDA)ANDMembers” plugins, then REST API access of PDA will be prevented for any other role except Admin (and the problem described above will manifest).

    To make it work, grant to the desired role (“Editor” in my case) the permission:
    “General” >> “Manage Options”

    Note that the problem manifested even if “Members” plugin was freshly installed (i.e. not yet configured), and even if plugin was subsequently disabled!!

    Plugin Support Muhammad

    (@muhammadwpfolio)

    Hi @csebe,

    Ah, that’s super helpful, thanks a lot for sharing!

    Good catch on the interaction between PDA and the Members plugin. I wouldn’t have expected it to affect things even when freshly installed or disabled, so that’s definitely something we’ll keep in mind moving forward.

    Glad you got it working, and really appreciate you taking the time to share the fix — it’ll definitely help others running into the same issue!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cannot protect file as Editor’ is closed to new replies.