Permission question regarding roles
-
Hello,
I created a custom role “my_role” and a custom post type “my_custom_type”.
Then, I add these permissions to the custom role:
$role = get_role('my_role');
$role -> add_cap('read_my_role');
$role -> add_cap('edit_my_role');
$role -> add_cap('publish_my_role');
$role -> add_cap('read_private_alumno');
// $role -> add_cap('edit_others_my_role');
$role -> add_cap('edit_published_my_role');
$role -> add_cap('delete_published_my_role');
$role -> add_cap('delete_private_my_role');Here my needs:
1 – User with “my_role” assigned should be able to create, publish and delete their own posts. This is working fine.
2 – User with “my_role” assigned should be able to View ONLY their own posts. This is not working. This user is able to View the post created by other users.
I tried removing this line, but not working:
$role -> add_cap('read_my_role');What I am missing here?
Please, let me know.
Regards,
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.