Title: Record Edit access level does not include delete
Last modified: August 30, 2016

---

# Record Edit access level does not include delete

 *  [bvisness](https://wordpress.org/support/users/bvisness/)
 * (@bvisness)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/record-edit-access-level-does-not-include-delete/)
 * I see that the Record Edit access level lets users add, edit, and list records,
   but not delete them. That is restricted to the Plugin Admin access level. So 
   I guess I have two questions:
 * 1. Why are users with Record Edit access able to add records but not delete them?
   
   2. Can I edit my site so that users with Record Edit access can do both?
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/record-edit-access-level-does-not-include-delete/#post-6479831)
 * You can use a filter to alter the privileges. This uses the API, so it’s expected
   you have some technical knowledge.
 * The filter is named ‘pdb-access_capability’ which is used to filter all capability
   checks. The filter receives 2 values: the current capability (according to the
   plugin settings) and the context. The context tells you which functionality is
   getting its access controlled. The context value you’re looking for is “delete
   participants” Here is an example, you’ll need to modify it according to your 
   needs.
 *     ```
       add_filter( 'pdb-access_capability', 'pdb_allow_editors_to_delete_records', 10, 2);
   
       function pdb_allow_editors_to_delete_records($cap, $context) {
         if ($context === 'delete participants') {
           $cap = 'edit_others_posts';
         }
         return $cap;
       }
       ```
   
 * You’ll recognize the capability “edit_others_posts” as being one that identifies
   the user as at least an “editor,” so depending on what role you want to have 
   the ability to delete records, you’ll need to select an appropriate capability
   for that role.
 * Take a look at the WP codex page on roles and capabilities if this doesn’t make
   sense to you.

Viewing 1 replies (of 1 total)

The topic ‘Record Edit access level does not include delete’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

## Tags

 * [permissions](https://wordpress.org/support/topic-tag/permissions/)

 * 1 reply
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/record-edit-access-level-does-not-include-delete/#post-6479831)
 * Status: not resolved