Custom userrole not able to save table
-
Hi
I have set up assigned permission to access wpDataTable to a custom user role. For example, when a user with a custom user-role “rag_admin” login then that user can only access wpDataTable. So we have added a condition if the page is equal to wpDataTable then add “manage_options”. Everything is working okay just not able to save the tables.
Getting Error
There was an error while trying to save the table! parsererror
It is happening due to some permission glitch.if (isset($_GET['page'])) { $page = $_GET['page']; // if the page has "wpdatatables-" if (strpos($page, 'wpdatatables-') === 0) { if (in_array('rag_admin', $current_user->roles)) { $allcaps['manage_options'] = true; } } } return $allcaps; hook: add_filter('user_has_cap', 'myuser_capabilities', 10, 3);
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom userrole not able to save table’ is closed to new replies.