Skip to content

Instantly share code, notes, and snippets.

@francium-lupe
Last active August 29, 2023 13:57
Show Gist options
  • Save francium-lupe/e7ca9021e754cad84c1583b3431a5915 to your computer and use it in GitHub Desktop.
Save francium-lupe/e7ca9021e754cad84c1583b3431a5915 to your computer and use it in GitHub Desktop.
Polar 1
actor User {}
# "admin" is a global role that applies to all vehicles
global {
roles = ["admin"];
}
resource Vehicle {
permissions = ["security", "update", "updateAuthorizedUsers"];
roles = ["admin", "manager", "booked-user"];
"security" if "booked-user";
"update" if "manager";
"updateAuthorizedUsers" if "admin";
"admin" if global "admin";
"manager" if "admin";
"driver" if "manager";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment