user
, represents users. This entity is empty because it’s only responsible for referencing users.organization
, represents organization that user and repositories belongs.
repository
, represents a repository in a github.
admin
and member
.
admin
indicates that the user got an administrative role in that organization and with the same logic member
represents a default user that belongs to that organization.
parent
and owner
. Both of these relations represent actual database relations with other entities rather than a role-based approach similar to the organization entity above.
parent
relation represents the parent organization of a repository. And owner
represents the specific user, the repository’s owner.
push
to that repo.read
.delete
the repository.parent
represents the parent organization of a repository. It can reach repositories parent organization relations with comma. So,
parent.admin
indicates admin role on organization
parent.member
indicates member of that organization.
Can user:1 edit project:1?
we will get Allow since the user:1
is an admin of the organization:1
and project:1
belongs to team:1
, which belongs to organization:1
.
Let’s break down this case,
team.edit
points to the edit action in the team (that the project belongs to). That edit action on the team entity (action edit = org.admin
) states that only admins of the organization (which that team belongs to) can edit. So our project inherits that action and conducts a result accordingly.
If we go back to our question: Can user:1 edit project:1?
this will give an Allow result, because user:1 is an admin in an organization that the projects’ parent team belongs to.
user
, represents users. This entity is empty because its only responsible for referencing users.organization
, represents an organization that contain teams.
team
, represents teams, which belong to an organization.
project
, represents projects that belong to teams.
admin
and member
users. Think of these as organizational-wide roles.
owner
, member
and org
team
and org
relations. Both these relations represent parent relationships with other entities, parent team and parent organization.