chance
11/23/2021, 3:34 AMchance
11/23/2021, 3:37 AMchance
11/23/2021, 3:39 AMchance
11/23/2021, 3:51 AMchance
11/23/2021, 3:54 AMJake
11/23/2021, 3:55 AMchance
11/23/2021, 3:56 AMphroggyy
11/23/2021, 9:48 AMdefinition example/resourcetype {
viewer: example/user
}
for example, but how should we think about resource types that have different actions/permissionsphroggyy
11/23/2021, 9:49 AMcreate
, view
, and comment
, while another will have the permission to view
, delete
, restore
, archive
, unarchive
, create
phroggyy
11/23/2021, 9:50 AMresourcetype
, we'd have to take all permissions of all resource types, and make them available on the "resourcetype" definitionphroggyy
11/23/2021, 9:57 AMdefinition entity1 {
viewer: user
creator: user
commenter: user
}
definition entity2 {
viewer: user
deleter: user
restorer: user
archiver: user
unarchiver: user
creator: user
}
definition resourcetype {
viewer: user
commenter: user
deleter: user
restorer: user
archiver: user
unarchiver: user
creator: user
}
in reality, we might have slightly fewer relations and more permissions (e.g archive and unarchive are probably covered by one relation and two permissions), but the problem still existsphroggyy
11/23/2021, 1:37 PMjob.view
, and then having a Policy
with a constraint where the job ID must be 42Jake
11/23/2021, 1:39 PMphroggyy
11/23/2021, 1:49 PMentity1
and entity2
are owned by us, but our customers can define their own teams. Each team can have access to either a "category" or "type" (e.g "all recruitments within the company"), or an individual entity ("recruitment 42"), so that's what I'm trying to represent; the ability to have access to "all recruitments"phroggyy
11/23/2021, 1:49 PMphroggyy
11/23/2021, 1:50 PMJake
11/23/2021, 1:53 PMJake
11/23/2021, 1:54 PMJake
11/23/2021, 1:55 PMJake
11/23/2021, 1:55 PMJake
11/23/2021, 1:55 PMbryana
11/23/2021, 2:33 PMrelation member: github/user | github/team#member
only covers the team members but not the team maintainers, who should also be considered members. The way we’ve been working with team membership as being inclusive of members and maintainers is with a permission on the team object which is permission membership = maintainer + member
. I realize we could grant the role to the team maintainers in addition to the members via github/role:repo_manager#member@github/team:team_fgp#maintainer
, but that doesn’t feel quite right. I’m wondering if there is a way we can adjust the team member
relation to include the maintainer
relation for the same team and get this to work.
I added an assertion to our playground for a team maintainer which is currently failing to illustrate this https://play.authzed.com/s/op7kPxacSaMUJake
11/23/2021, 2:34 PMmember = maintainer + direct_member
and then keep relation member: github/user | github/team#member
bryana
11/23/2021, 2:38 PMJake
11/23/2021, 2:40 PMJake
11/23/2021, 2:41 PMrelation member: github/user | github/team#membership
Jake
11/23/2021, 2:42 PMmembership
when building your relationshipsJake
11/23/2021, 2:44 PMbryana
11/23/2021, 2:45 PMgithub/team#membership
bryana
11/23/2021, 2:45 PM