This repository runs the permify validate command on the given schema (authorization model) and relationships (sample authorization data) and assertions (sample check queries and results).
schema: >-
entity user {}
entity organization {
relation admin @user
relation member @user
action create_repository = (admin or member)
action delete = admin
}
entity repository {
relation owner @user
relation parent @organization
action push = owner
action read = (owner and (parent.admin and parent.member))
action delete = (parent.member and (parent.admin or owner))
}
relationships:
- "organization:1#admin@user:1"
- "organization:1#member@user:1"
- "repository:1#owner@user:1"
assertions:
- "can user:1 push repository:1": true
- "can user:1 push repository:2": false
- "can user:1 push repository:3": falseAdd the action following your workflow:
- With local file
steps:
- uses: "permify/permify-validate-action@v1"
with:
validationFile: "test.yaml"- With url
steps:
- uses: "permify/permify-validate-action@v1"
with:
validationFile: "https://gist.github.com/permify-bot/bb8f95acb64525d2a41688ae0a6f4274"Permify is an open-source authorization service for creating and maintaining fine-grained authorizations accross your individual applications and services.
Join our Discord channel for issues, feature requests, feedbacks or anything else. We love to talk about authorization and access control ❤️