Closed rekmarks closed 2 years ago
I'm basically fine with this. The reason we used arrays was when we were baking delegations into the permissions table, and so you could have multiple permissions for a single method from multiple delegators, but we took that out, so it's now just a side effect of an un-pursued feature.
Permissions are currently stored as arrays under the key
permissions
indomain
objects. Whenever we want to identify a specific permission, we have to iterate over this array. Permissions will always be unique byparentCapability
, and we should simply key their storage thereby for more ergonomic permission retrieval.Note:
domain
is ocap lingo and equivalent toorigin
as used in the context of permissions in the extension.Current structure:
Proposed structure: