Modeling inherited entitlements #532
-
|
Hi there! I'm trying to model something similar to the entitlements example but with hierarchal organizations. In this case, organizations can have parents and the entitlements from the parent should apply to the children. The first way I tried it was putting an I landed on this: ... and the tests are: # test.yaml
tuples:
- user: account:child
relation: parent
object: account:parent
- user: service:messaging
relation: is_entitled_to
object: account:parent
tests:
- name: Child has a parent
check:
- user: account:child
object: account:parent
assertions:
parent: true
- name: Parent can access messaging
check:
- user: service:messaging
object: account:parent
assertions:
is_entitled_to: true
- name: Child can access messaging
check:
- user: service:messaging
object: account:child
assertions:
is_entitled_to: trueThat last test is failing but I'm not sure why: I can model this with users and having their membership be inherited but that's not technically correct and I'm curious why the above does not pass. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @joshcanhelp! The parent/child tuple is reversed :) "User account:parent is related to object account:child as a parent" |
Beta Was this translation helpful? Give feedback.
Hi @joshcanhelp!
The parent/child tuple is reversed :)
"User account:parent is related to object account:child as a parent"