Documentation ¶
Index ¶
Constants ¶
View Source
const ( PermAuthAdmin = "auth.admin" // Constant for assigning a permission to auth admins PermAuthView = "auth.view" // Constant for assigning a permission to auth viewers )
Define constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct {
// contains filtered or unexported fields
}
Author is the base type for this plugin, all functionality is built on this
func (*Author) CheckPerm ¶
CheckPerm takes a request and list of permissions and returns true/false depending on if the request is authorized
func (*Author) PermGuard ¶
PermGuard is a convenience method for providing an error message when the perms don't check out
func (*Author) RegisterPermString ¶
RegisterPermString registers a permission string
type Permission ¶
Permission stores strings that represent the permissions assigned to a particular user
Click to show internal directories.
Click to hide internal directories.