feat: adjust capabilities#236
Conversation
dbe4287 to
d8dfad7
Compare
naxoc
left a comment
There was a problem hiding this comment.
I tested this locally. It does indeed make the menu item go away, but it is also gone for my admin user. Should the capability be added/registered somewhere for it to work?
| 'capabilities' => [ | ||
| 'create_posts' => 'not_a_real_capability', // Set to a fake capability to remove "add new" button. | ||
| 'create_posts' => 'not_a_real_capability', // Set to a fake capability to remove "add new" button. | ||
| 'edit_posts' => \Newspack_Network\Admin::REQUIRED_CAPABILITY, |
There was a problem hiding this comment.
Nit: it's the same namespace, so \Network_Network\ is not needed
Ah, that's true. This will depend on Automattic/newspack-plugin#3920, then, when it's merged. |
|
Housekeeping as part of the monorepo cutover (NPPM-2752): this repository is now legacy and active development has moved to the newspack-workspace monorepo. Closing this stale draft (no activity in 6+ months) to keep the legacy backlog clean. This isn't a rejection of the work. If the change is still relevant, please re-open it as a PR against the monorepo under the matching |
All Submissions:
Changes proposed in this Pull Request:
Adjusts caps, so the unavailable menu options are hidden for non-admins.
Dependent on Automattic/newspack-plugin#3920
How to test the changes in this Pull Request:
trunk,Other information: