Sleipnir
12/01/2021, 5:56 PMSleipnir
12/01/2021, 5:57 PMJoey
12/01/2021, 5:58 PMJoey
12/01/2021, 5:58 PMSleipnir
12/01/2021, 5:58 PMSleipnir
12/01/2021, 5:58 PMJoey
12/01/2021, 5:59 PMJoey
12/01/2021, 5:59 PMJoey
12/01/2021, 5:59 PMJoey
12/01/2021, 5:59 PMSleipnir
12/01/2021, 7:05 PMJake
12/01/2021, 7:11 PMSleipnir
12/01/2021, 7:11 PMJake
12/01/2021, 7:12 PMSleipnir
12/01/2021, 7:13 PMJake
12/01/2021, 7:15 PMJake
12/01/2021, 7:15 PMSleipnir
12/01/2021, 7:16 PMJake
12/01/2021, 7:17 PMJake
12/01/2021, 7:19 PMSleipnir
12/01/2021, 7:32 PMbryana
12/03/2021, 4:58 PMdefinition github/repository_unlock {
relation unlocker: github/user
permission access = unlocker
}
definition github/repository {
relation unlock: github/repository_unlock
permission manage_settings = unlock->access
}
However, there is a validation that says that a user cannot have a repo unlock unless they are a staff member. I think I could model that by:
definition github/site {
relation staff_member: github/user
permission staff_access = staff_member
}
definition github/repository_unlock {
relation unlocker: github/user
relation site: github/site
permission access = unlocker & site->staff_access
}
That, however, comes with the big tradeoff that I have to create a relationship for every repository_unlock object to the site (I think a wildcard would help here but that’s another story). If I removed this staff member “validation” in the permission check it is something I could check instead at the point I’m generating the repository_unlock unlocked relations and leave it out of the schema. WDYT?Joey
12/03/2021, 5:31 PMJoey
12/03/2021, 5:31 PMJoey
12/03/2021, 5:31 PMbryana
12/03/2021, 5:42 PMbryana
12/03/2021, 5:45 PMrelation site: github/site
to add the site->staff_access
check in the repo permission. A repo can be org owned and I do have a site relation there, but it can also be user owned and there is no site
relation on the user.bryana
12/03/2021, 5:45 PMJoey
12/03/2021, 5:49 PMnamespace
type