Documentation ¶
Overview ¶
Acl implements a simple role based access control
Configuration file format:
# A comment [rules] * * * - # deny all to all, to start with purchasing /purchasing/* * +
[groups] name group1 group2 ...
All rules are checked in order.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct {
// contains filtered or unexported fields
}
ACL contains rules and groups for implementing an access control list
func New ¶
New creates a new Acl object, either from a configuration file, or empty if an empty string is given as argument.
func (*ACL) Enforce ¶
Enforce checks the ACL for a specific resource and user, and returns true if access is granted.
Click to show internal directories.
Click to hide internal directories.