Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
wp cap list output does not reflect grant #18
Listing a role's capabilities does not show whether the capability has been granted or not.
Example code from a plugin/theme:
wp cli output for
Whether the adding of false for a capability is correct instead of removing it is another discussion, but the grant status should be shown in the output since it is a valid argument for
I would propose the output using the table formatter by default and adding a second column for grant.
+1 for addressing this issue. I don't feel like this command is useful without the distinction.
In the docs,
To me, that means capabilities a given role is granted. As an alternative to showing grant in a different column, I propose hiding all capabilities with grant = false since
Yes, I agree, this distinction is important and mustn't get lost.
To keep from breaking existing scripts, I think we should go with @dougaxe1 's proposal. Additionally, we can provide a more detailed list representation under a separate flag, like