You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
permissionKey cannot express an OR of keys, so multi-key affordances cannot adopt PermissionShield #1747
So an affordance that is legitimately gated on more than one key cannot adopt the declarative path at all - supplying either key alone narrows access, and supplying none forfeits the shield.
Concrete case
layer5io/meshery-cloud's Identity → Organizations nav item:
A provider admin holds View All Organizations; an org member holds View Org. Passing permissionKey: Keys.IdentityAccessManagementViewOrg would hide the item from provider admins who only hold the former, and vice versa. That item is consequently the one entry left on the legacy boolean path in layer5io/meshery-cloud#5757, so it renders no PermissionShield and gives the user no explanation when access is blocked.
Proposed fix
Let permissionKey accept a set with an explicit combinator, defaulting to the current single-key behaviour:
useHasPermission resolves anyOf with .some(...) and allOf with .every(...). PermissionShield can list every unmet key in its tooltip, which is strictly more useful than the single-key rendering.
This is backwards compatible: a bare Key keeps working unchanged.
Activity
feat(permissions): let permissionKey express a set of keys