permissions

package
v0.0.0-...-9818b01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2017 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ContextClaims = "token_claims"

ContextClaims is the key used in echo context to store claims #nosec

View Source
const ContextPermissionSet = "permissions_set"

ContextPermissionSet is the key used in echo context to store permissions set

Variables

exports all constants from pkg/permissions to avoid double imports

View Source
var ErrNoToken = errors.New("No token in request")

ErrNoToken is returned whe the request has no token

Functions

func Allow

Allow validates the validable object against the context permission set

func AllowTypeAndID

func AllowTypeAndID(c echo.Context, v permissions.Verb, doctype, id string) error

AllowTypeAndID validates a type & ID against the context permission set

func AllowWholeType

func AllowWholeType(c echo.Context, v permissions.Verb, doctype string) error

AllowWholeType validates that the context permission set can use a verb on the whold doctype

func Extractor

func Extractor(next echo.HandlerFunc) echo.HandlerFunc

Extractor extracts the permission set from the context

func Routes

func Routes(router *echo.Group)

Routes sets the routing for the status service

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL