How have you all been doing super users? I.e. user...
# talk-keto
p
How have you all been doing super users? I.e. users that can access things they aren't related to.
l
My method has been to use semi-rbac, where users are assigned a role (e.g. roles:SUPER_USER#member@userId) and then using the * subject
with permissions for namespace:*#permission@<roles:SUPER_ADMIN#member>
when I'm performing a check, I check first for the specific object permission, then for the admin permission. There's probably a better way of doing this now with the Ory Permission Language, but I haven't looking into migrating to it yet
p
Thanks for the reply! That seems like a good way to do it. I landed on something like:
Copy code
class User implements Namespace {}


class Group implements Namespace {
  related: {
    members: (User)[]
  }
}

class Account implements Namespace {
  related: {
    platformAdmins: (SubjectSet<Group, "members">)[]
  }
}
And then I just add the admins group to every account that gets created.