https://authzed.com logo
#spicedb
Title
# spicedb
p

panakotta00

03/20/2022, 12:08 PM
Copy code
definition user {
    relation global: global
    relation self: user

    permission view_all = self + global->admin
}

definition global {
  relation admin: user

  permission edit_tags = admin
  permission moderate_users = admin
}

definition package {
    relation global: global
    relation owner: user

    permission write = owner
    permission moderate = global->admin
    permission view_all = write + moderate
}

definition release {
    relation package: package

    permission write = package->write
    permission moderate = package->moderate
    permission view_all = write + moderate
}
relationships:
Copy code
user:123 global global:0
user:123 self user:123
user:1505187930019201024 global global:0
user:1505187930019201024 self user:1505187930019201024
user:456 global global:0
user:456 self user:456
package:123 global global:0
package:123 owner user:123
package:456 global global:0
package:456 owner user:123
package:789 global global:0
package:789 owner user:456
release:123 package package:123
release:1485241040314040320 package package:123
release:1485241051349254144 package package:123