This repository has been archived by the owner on Jun 5, 2022. It is now read-only.
v0.1.0 - Initial Release
This is the initial release of this project.
Features
PermissionScope
class
- Target your permissions to specific subsections of applications/tools.
- Scopes are formatted as
tierOne:tierTwo:tierThree:...
- Scopes support wildcards for tiers, however wildcards cannot be combined with other text.
- e.g.,
sample:*:scope
has a wildcard in tier two, butsample:*substring*:scope
does not.
- e.g.,
PermissionState
enum
- Permissions can have three states:
ALLOW
,DENY
, orNONE
to inherit.
Permission
class
- Permissions are essentially just a way to pair a PermissionScope to a PermissionState.
PermissionTree
class
- Group permissions together logically based off of user or group, for example.
- Permissions have a specific order to how they are evaluated, and rules for how it is determined whether one permission has priority over another in the event of conflicts.
PermissionTreeStack
class
- Stack multiple PermissionTrees on top of each other.
- Useful when dealing with multiple permission trees applied to one user.
- e.g., user is in multiple groups, or user is "mimicking" another user/group to see what they see with their permissions.
- PermissionTreeStacks return the first matching Permission's state, or
NONE
if no PermissionTrees match.- In other words, the priority rules used in
PermissionTree
s do not apply toPermissionTreeStack
s.
- In other words, the priority rules used in