rbac

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Require

func Require(accessions ...accession.Accession) gin.HandlerFunc

根据 RBAC 鉴权的中间件

Types

type Controller

type Controller struct {
	Roles []*role.Role
}

func New

func New(uid string) (c *Controller, err error)

func (*Controller) Has

func (c *Controller) Has(a accession.Accession) bool

检验是否拥有单独的权限

func (*Controller) Require

func (c *Controller) Require(a []accession.Accession) bool

验证是否有这些权限

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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