auth

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAdminLevel = 5
View Source
const DefaultOwnerLevel = 1

Variables

This section is empty.

Functions

func CheckPriority added in v0.1.0

func CheckPriority(ctx *zero.Ctx, priority int, tip bool) bool

CheckPriority 检查权限

func GetGroupUserPriority

func GetGroupUserPriority(groupID, userID int64) (level int)

GetGroupUserPriority 获取指定群指定用户的权限等级,数字越小,代表权限越高

func InitialGroupPriority

func InitialGroupPriority(ctx *zero.Ctx, groupID int64) error

InitialGroupPriority 初始化指定群的所有管理员权限等级(若不存在)

func SetGroupUserPriority

func SetGroupUserPriority(groupID, userID int64, level int) error

SetGroupUserPriority 将指定群指定用户的权限等级设为level

Types

This section is empty.

Jump to

Keyboard shortcuts

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