Skip to content
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

Remove capabilities e.g. 'read' from WordPress.WP.Capabilities #2399

Closed
1 task
kkmuffme opened this issue Oct 24, 2023 · 1 comment
Closed
1 task

Remove capabilities e.g. 'read' from WordPress.WP.Capabilities #2399

kkmuffme opened this issue Oct 24, 2023 · 1 comment

Comments

@kkmuffme
Copy link

Is your feature request related to a problem?

Checking 'read' capability is technically correct, however practically this doesn't make particular sense, since this is a permission all users have.
I'd like to be able to remove this capability from the rule via config, as most likely this current_user_can check is not safe enough.

Describe the solution you'd like

Config to remove default WP capabilities or remove it by default

Additional context (optional)

  • I intend to create a pull request to implement this feature.
@jrfnl
Copy link
Member

jrfnl commented Aug 20, 2024

Closing as the WordPress.WP.Capabilities is not about whether the right capability is used in specific circumstances, but about making sure that capabilities are used which are not deprecated and are not roles.

Making the capabilities configurable would break the principle of this sniff and is therefore not on the table.

I can imagine a (new) sniff which checks that a minimum capability is used in combination with certain functions, but that's a completely different request and would need a lot of bike shedding to even get a viable outline on which to base the sniff.

@jrfnl jrfnl closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants