permission

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUserPermissions

func CheckUserPermissions() gin.HandlerFunc

casbin检查用户对应的角色权限是否允许访问接口

func CheckUserRole

func CheckUserRole(roles ...string) gin.HandlerFunc

casbin检查用户对应的角色权限是否允许访问接口

func NeedAdmin

func NeedAdmin() gin.HandlerFunc

管理员可以访问

func NeedSystemUser

func NeedSystemUser() gin.HandlerFunc

系统用户可以访问

Types

type PermissionService

type PermissionService interface {
	CheckPermission(userId string, resourceId string, action string) (bool, error)
}

Jump to

Keyboard shortcuts

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