Change WordPress user roles and capabilities › Forums › Bug Reports › Admin profile lost some of the Categories after latest update › Reply To: Admin profile lost some of the Categories after latest update
Thanks for the help with isolating this issue and testing a fix for it.
Sami, default category is assigned to the post created by super-admin for the same reason. I removed the early current user permissions checking (which were made for any wp-admin page) in v. 4.38, but did not re-check that the same permissions check is done later for the all used hooks.
If there will be a need to fix it before the next update become available, open the same v. 4.38 wp-content/plugins/user-role-editor-pro/pro/includes/classes/post-edit-access.php file, find auto_assign_term() function declaration and add current user permissions checking, like on the image below:
public function auto_assign_term($post_id, $post, $update) {
if (empty($post_id)) {
return;
}
if ($post->post_type=='revision') { // Do nothing with revisions
return;
}
// do not limit user with Administrator role or the user for whome posts/pages edit restrictions were not set
if (!$this->user->is_restriction_applicable()) {
return;
}
$terms_list_str = $this->user->get_post_categories_list();