| @@ -18,9 +18,9 @@ | ||
| 18 | 18 | $this->actions = [ |
| 19 | 19 | /** Get entries with pagination */ |
| 20 | 20 | 'get_entries' => [ |
| 21 | 21 | 'callback' => [ $this, 'get_entries' ], |
| 22 | - 'capability' => 'manage_options', | |
| 22 | + 'capability' => 'ablocks_view_submissions', | |
| 23 | 23 | 'fields' => array( |
| 24 | 24 | 'is_in_trash' => 'string', // yes/no; default: no |
| 25 | 25 | 'search' => 'string', // name of form |
| 26 | 26 | 'form_type' => 'string', // name of form |
| @@ -37,9 +37,9 @@ | ||
| 37 | 37 | ], |
| 38 | 38 | /** Get single entry */ |
| 39 | 39 | 'get_entry' => [ |
| 40 | 40 | 'callback' => [ $this, 'get_entry' ], |
| 41 | - 'capability' => 'manage_options', | |
| 41 | + 'capability' => 'ablocks_view_submissions', | |
| 42 | 42 | 'fields' => array( |
| 43 | 43 | 'entry_id' => 'integer', // int : entry id |
| 44 | 44 | ) |
| 45 | 45 | ], |
| @@ -45,9 +45,9 @@ | ||
| 45 | 45 | ], |
| 46 | 46 | /** Edit entry */ |
| 47 | 47 | 'edit_entry' => [ |
| 48 | 48 | 'callback' => [ $this, 'edit_entry' ], |
| 49 | - 'capability' => 'manage_options', | |
| 49 | + 'capability' => 'ablocks_view_submissions', | |
| 50 | 50 | 'fields' => array( |
| 51 | 51 | 'entry_id' => 'integer', // int : entry id |
| 52 | 52 | 'data' => 'array', |
| 53 | 53 | ) |
| @@ -54,9 +54,9 @@ | ||
| 54 | 54 | ], |
| 55 | 55 | /** Delete entries */ |
| 56 | 56 | 'delete_entries' => [ |
| 57 | 57 | 'callback' => [ $this, 'delete_entries' ], |
| 58 | - 'capability' => 'manage_options', | |
| 58 | + 'capability' => 'ablocks_view_submissions', | |
| 59 | 59 | 'fields' => array( |
| 60 | 60 | 'entry_id_array' => 'array', |
| 61 | 61 | ) |
| 62 | 62 | ], |
| @@ -62,9 +62,9 @@ | ||
| 62 | 62 | ], |
| 63 | 63 | /** Mark entries as read */ |
| 64 | 64 | 'mark_entries_as_read' => [ |
| 65 | 65 | 'callback' => [ $this, 'mark_entries_as_read' ], |
| 66 | - 'capability' => 'manage_options', | |
| 66 | + 'capability' => 'ablocks_view_submissions', | |
| 67 | 67 | 'fields' => array( |
| 68 | 68 | 'entry_id_array' => 'array', |
| 69 | 69 | ) |
| 70 | 70 | ], |
| @@ -70,9 +70,9 @@ | ||
| 70 | 70 | ], |
| 71 | 71 | /** Mark entries as unread */ |
| 72 | 72 | 'mark_entries_as_unread' => [ |
| 73 | 73 | 'callback' => [ $this, 'mark_entries_as_unread' ], |
| 74 | - 'capability' => 'manage_options', | |
| 74 | + 'capability' => 'ablocks_view_submissions', | |
| 75 | 75 | 'fields' => array( |
| 76 | 76 | 'entry_id_array' => 'array', |
| 77 | 77 | ) |
| 78 | 78 | ], |
| @@ -78,9 +78,9 @@ | ||
| 78 | 78 | ], |
| 79 | 79 | /** Send one or more entries to trash */ |
| 80 | 80 | 'send_entries_to_trash' => [ |
| 81 | 81 | 'callback' => [ $this, 'send_entries_to_trash' ], |
| 82 | - 'capability' => 'manage_options', | |
| 82 | + 'capability' => 'ablocks_view_submissions', | |
| 83 | 83 | 'fields' => array( |
| 84 | 84 | 'entry_id' => 'integer', // int : entry id |
| 85 | 85 | ) |
| 86 | 86 | ], |
| @@ -86,9 +86,9 @@ | ||
| 86 | 86 | ], |
| 87 | 87 | /** Send one or more entries to trash */ |
| 88 | 88 | 'restore_entries_from_trash' => [ |
| 89 | 89 | 'callback' => [ $this, 'restore_entries_from_trash' ], |
| 90 | - 'capability' => 'manage_options', | |
| 90 | + 'capability' => 'ablocks_view_submissions', | |
| 91 | 91 | 'fields' => array( |
| 92 | 92 | 'entry_id' => 'integer', // int : entry id |
| 93 | 93 | ) |
| 94 | 94 | ], |