Join GitHub today
#16841: Capability Queries #286
This PR adds capability options to
It leverages the previous work we've done on querying the capability meta fields, so it doesn't contain too much magic sauce.
Basically, when querying for capabilities, it checks which roles do have these caps and queries for the roles instead. Plus, it queries for the capability as well in case it was added directly to a user.
See #16841 on Trac for more information.
boonebgorges left a comment
General technique gets a +1 from me - as you note, it relies on the awful
No additonal comments from me except from the multisite support regarding roles possibly need to be switched temporarily before retrieving them.
I like the approach, I definitely agree that thorough tests are needed. Those will uncover possible issues in the logic, but so far I haven't been able to detect any problems. Happy to have another look related to tests in the near future.