permissions

package
v0.0.0-...-937ee59 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package permissions provides simple yet powerful interface to managing permissions author: Karol Piłat <karol@vitresoft.com>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Permissible

type Permissible interface {
	HasPermission(perm string) bool
}

Permissible is the interfece that wraps basic HasPermission method

type Set

type Set map[string]bool

Set is basic set of permissions

func (Set) Apply

func (ps Set) Apply(perms Set, root string, override bool) error

Apply can rewrite whole set of permissions

func (Set) HasPermission

func (ps Set) HasPermission(perm string) bool

HasPermission implements checking if permission is in Set

func (Set) SetPermission

func (ps Set) SetPermission(perm string, value bool)

SetPermission sets permission

Jump to

Keyboard shortcuts

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