Hi Team, we have this requirement for which we are...
# spicedb
s
Hi Team, we have this requirement for which we are evaluating spiceDB and Authzed for, the structure of permissions can be summarized as follows: 1. The basic thing we are trying to protect is a platform_crud_resource, which has read/write permissions 2. There is a concept of a role which will be a collection of permissions on different platform_crud_resources. 3. There are teams and within them - subteams which are a collections of roles. 4. There are users that belong to subteams, the permissions that they would have will be the sum of all role permissions. I have tried to model it as follows:
Copy code
definition subteam {
               relation team : team
               relation user : user
            }
            
            definition user {
                relation subteam: subteam
            }
            

            definition team {
                relation subteam: subteam

            }

            definition role {
              relation subteam: subteam
            }
             
            definition platform_crud_resource {
                relation reader: role
                relation writer: role
                relation viewer: role
                relation remover: role
                
                permission read = reader
                permission write = writer
                permission view = viewer
                permission remove = remover
            }