Perms
An extremely flexible permissions system
Table of Contents
Nodes
A permission node grants a particular kind of access to a resource.
It should be formatted as follows
[-]<resource>[.<sub_resource>...].<verb>
The following are examples of good nodes
projects.webserver.buildprojects.webserver.chat.useprojects.webserver.chat.moderate
Important Considerations
- Nodes are case sensitive
- Only runes within UTF8 0x21 to 0x7e are allowed.
- Whitespaces are not allowed
Wildcards
An asterisk or * may be used to signify a wildcard match.
The * node would match every permission.
The projects.* node would match for
projects.*projects.webserver.test- etc.
The projects.*.chat.use node would match for
projects.webserver.chat.useprojects.database.chat.useprojects.client.chat.use
The match isn't bidirectional. projects.use does not match *.
Negations
A - prefixing a node signifies it's negated. Negation will be only be overwritten if the
user has the node explicitely defined. If the negation lies directly on the user, it must be removed
for the user to have access to the permission.
if Bob has
*-projects.*
He has access to
billing.budget.manage
But not
projects.webserver.use
List
The standard way to list nodes is to delimit them with whitespace. Redudent whitespaces are ignored.
The following lists are functionally identitical.
projects.publish projects.manage
projects.publish
projects.manage
use ParseNodes() to parse a list of nodes.
Nodes.String() return a newline delimited string of nodes.

