roles

package
v0.0.0-...-1f9a799 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanRoleAccessURL

func CanRoleAccessURL(role string, url string) bool

func CanUserAccessURL

func CanUserAccessURL(user *entities.User, url string)

Types

type Role

type Role struct {
	Name  string
	Level int
}

Predefined roles with Level integer

type Route

type Route struct {
	Name string
	Role *Role
	Path string
}

Routes (pulled from the yaml file) with minimum Role needed to access it

Jump to

Keyboard shortcuts

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