[wp-trac] [WordPress Trac] #38997: delete_private_posts capability doesn't prevent user from deleting private posts
WordPress Trac
noreply at wordpress.org
Wed Nov 30 21:18:39 UTC 2016
#38997: delete_private_posts capability doesn't prevent user from deleting private
posts
--------------------------+------------------------------
Reporter: yboris | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 4.6.1
Severity: normal | Resolution:
Keywords: | Focuses: administration
--------------------------+------------------------------
Comment (by yboris):
The above "global $current_user" was a shorthand of:
{{{#!php
<?php
$current_user = wp_get_current_user();
$current_user->allcaps['delete_published_posts'] = 0;
$current_user->allcaps['delete_private_posts'] = 0;
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38997#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list