Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#43146 closed defect (bug) (fixed)

Term title links to incorrect location for users with insufficient capabilities

Reported by: grapplerulrich's profile grapplerulrich Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.1 Priority: normal
Severity: normal Version: 4.7
Component: Taxonomy Keywords: has-patch has-screenshots
Focuses: administration Cc:

Description

I created a custom taxonomy.

The user had sufficient capabilities to access the taxonomy but not to edit and delete it. The action row is correctly not displayed but the link in the title is not handled correctly.

'capabilities'          => [
	'manage_terms' => 'manage_categories',
	'edit_terms'   => 'manage_custom_tax',
	'delete_terms' => 'manage_custom_tax',
	'assign_terms' => 'edit_posts',
],

/wp-admin/edit-tags.php?taxonomy=custom_tax

Attachments (3)

Term Current Screenshot.jpeg (69.9 KB) - added by grapplerulrich 6 years ago.
How the title with the link looks like now
43146.patch (1.3 KB) - added by grapplerulrich 6 years ago.
term title with patch.jpeg (65.6 KB) - added by grapplerulrich 6 years ago.
Screenshot of term title with the patch

Download all attachments as: .zip

Change History (7)

@grapplerulrich
6 years ago

How the title with the link looks like now

@grapplerulrich
6 years ago

Screenshot of term title with the patch

#1 @ocean90
6 years ago

  • Keywords has-patch has-screenshots added

#2 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 5.0

#3 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 42565:

Taxonomy: Don't display an empty edit link in taxonomy list table if the user doesn't have permissions to edit the term.

Props grapplerulrich.
Fixes #43146.

#4 @johnbillion
5 years ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.