-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom capabilities for story post type #3507
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## main #3507 +/- ##
==========================================
- Coverage 83.53% 83.24% -0.30%
==========================================
Files 778 778
Lines 13459 13487 +28
==========================================
- Hits 11243 11227 -16
- Misses 2216 2260 +44
Flags with carried forward coverage won't be shown. Click here to find out more.
|
532be05
to
f028991
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the places that reference edit_posts
will also need to be changed. see https://github.com/google/web-stories-wp/search?q=edit_posts&type=
@spacedmonkey Good point regarding updating occurrences of Besides that, I think I should add some E2E tests here to verify the behavior for the various user roles... WDYT? |
Should all tests run in different user roles like how gutenberg e2e works? Some tests could be skip for some roles. |
That's no longer accurate. Gutenberg used to run all tests twice, once for authors, once for admins. No other roles. However, that got broken once, and author tests were removed entirely in WordPress/gutenberg#23588. They want to have more targeted author tests in the future. There's no point in running the whole test suite N times for N roles, and then skipping the majority of tests because the role doesn't have many capabilities anyway. More targeted tests are more useful, Similarly, we could have a NB, one cannot easily programmatically skip tests with Jest anyway, see jestjs/jest#7245 |
So the last two things,
|
# Conflicts: # tests/phpunit/tests/Dashboard.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice an issue.
Co-authored-by: Jonny Harris <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Adds custom capabilities for story post type to allow for more granular control.
Relevant Technical Choices
To-do
User-facing changes
N/A
Testing Instructions
Fixes #3262