From 0c672d6ee0a013851fc5651ac39e96e45464dc02 Mon Sep 17 00:00:00 2001 From: Tolga Ozen Date: Sat, 16 Dec 2023 03:19:43 +0300 Subject: [PATCH] refactor: more meaningful organization & hierarchies data and scenarios --- .../organizations-hierarchies.yaml | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/assets/example-shapes/organizations-hierarchies.yaml b/assets/example-shapes/organizations-hierarchies.yaml index 89d17e735..6b16a9594 100644 --- a/assets/example-shapes/organizations-hierarchies.yaml +++ b/assets/example-shapes/organizations-hierarchies.yaml @@ -1,47 +1,47 @@ schema: |- - entity user {} + entity user {} - entity organization { + entity organization { - // organizational roles - relation admin @user - relation member @user + // organizational roles + relation admin @user + relation member @user - } + } - entity repository { + entity repository { - // represents repositories parent organization - relation parent @organization + // represents repositories parent organization + relation parent @organization - // represents owner of this repository - relation owner @user + // represents owner of this repository + relation owner @user - // permissions - permission edit = parent.admin or owner - permission delete = owner - } + // permissions + permission edit = parent.admin or owner + permission delete = owner + } relationships: - - "organization:tech_corp#admin@user:admin_user" - - "repository:core_system#parent@organization:tech_corp" + - organization:6574#admin@user:5678 + - repository:1234#parent@organization:6574 attributes: - + scenarios: - name: admin_access_test checks: - - entity: repository:core_system - subject: user:admin_user + - entity: repository:1234 + subject: user:5678 context: null assertions: edit: true delete: false - - entity: repository:dev_portal - subject: user:dev_member + - entity: repository:91011 + subject: user:1213 context: null assertions: - edit: false + edit: false delete: false entity_filters: [] subject_filters: []