Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jbostoen

    (@jbostoen)

    Looks like it might be easier than I thought, although I’m not sure what implications it might have.

    In CTXPS_Ajax.php, replace edit_others_posts with edit_posts (if users have that role)

    Plugin Author Dutch van Andel

    (@veraxus)

    That should be pretty much it. I’m prepping a small patch for 4.3 so you may loose that change if you update. To ensure everything continues working for you, I added two new hooks: ‘ctxps_edit_protection_cap’ and ‘ctxps_edit_membership_cap’. You can start using them now, and when I push the update, you shouldn’t see any changes in your setup.

    ctxps_edit_protection_cap is a filter that lets you set what specific capability is required to edit object permissions (attach or detach groups from objects).

    ctxps_edit_membership_cap is a filter that lets you set what specific capability is required to add/remove users from groups.

    Neither of these check the users relationship to the current page, however. You’d have to check that yourself against the $current_user object.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Allow restriction by non-admins?’ is closed to new replies.