perm

package
v0.0.0-...-fa598d4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGroup

func AddGroup(params ...interface{}) bool

AddGroup : method of group policy adding first : user second : group

func AddGroupRole

func AddGroupRole(params ...interface{}) bool

AddGroupRole : assign role to a user group

func AddPerm

func AddPerm(params ...interface{}) bool

AddPerm : method for permission policy adding sub,obj,act,domain

func CommitChange

func CommitChange()

dangerous! do not call until you really need it

func DelFilteredPerm

func DelFilteredPerm(fieldIndex int, params ...string) bool

DeleteFilteredPerm

func DelGroup

func DelGroup(params ...interface{}) bool

DelGroup : method of group policy deleting

func DelGroupPerm

func DelGroupPerm(params ...interface{}) bool

DelGroupPerm : delete user group - role connection

func DelPerm

func DelPerm(params ...interface{}) bool

DelPerm : delete permission policy

func DelRole

func DelRole(role string)

DelRole : delete specific role

func DelRoleByDomain

func DelRoleByDomain(role string, domain string)

DelRoleByName : delete all specific role policy of domain

func Enforce

func Enforce(params ...interface{}) bool

Enforce : check permission

func GetAllPermsByRole

func GetAllPermsByRole(role string) [][]string

GetAllPermsByRole : get all permission across domains

func GetAllPermsByRoleDomain

func GetAllPermsByRoleDomain(role string, domain string) [][]string

GetAllPermsByRoleDomain : get policies by role and domain

func GetAllPermsByUser

func GetAllPermsByUser(uid string) [][]string

GetAllPermsByUser : get all permission across domains

func GetGroupsByUser

func GetGroupsByUser(userId string) [][]string

GetGroupsByUser : get groups by specific user

func SetUp

func SetUp(cluster bool)

SetUp permission handler

func SetUpForTest

func SetUpForTest(dir string)

SetUpForTest : for unit tests

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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