Opened 15 hours ago
Last modified 12 hours ago
#62737 new defect (bug)
Block editor Author list missing capability check
Reported by: | cagdasdag | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7.1 |
Component: | General | Keywords: | has-testing-info has-screenshots has-patch |
Focuses: | administration, rest-api | Cc: |
Description
Hello
The author dropdown in page settings is not working correctly in block editor. It doesn't check user capabilities.
Here is the steps to replicate
- Install a fresh WP
- Create a contributor user so you will have 2 user 1 admin and 1 contributor
- Create a page in Classic Editor
- You will see it is showing only admin user in Author change dropdown because contributor doesn't have edit_pages capability
- Create a page in Block Editor
- Go to author change dropdown, you will see contributor user as well.
Which looks a bug to me. We need to make sure that there is a capability check.
Screenshots;
Classic Editor:
https://share.cleanshot.com/69vlJWcH
Block Editor:
https://share.cleanshot.com/xyVlryhh
Change History (5)
This ticket was mentioned in PR #8043 on WordPress/wordpress-develop by @dilipbheda.
12 hours ago
#2
- Keywords has-patch added
#3
@
12 hours ago
@cagdasdag Thanks for the report.
I've fixed the issue in the attached PR.
@sukhendu2002 Could you test it and share the report?
Thanks!
@cagdasdag commented on PR #8043:
12 hours ago
#5
I don't think the fix is correct. In classic editor we have post_type_object->cap->edit_posts check. So we should use same capability check for consistency.
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
Actual Results
Supplemental Artifacts
Block Editor
Classic Editor