mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
17 lines
351 B
Go
17 lines
351 B
Go
package ginx
|
|
|
|
type Permission struct {
|
|
NeedToken bool // 是否需要token
|
|
NeedCasbin bool // 是否进行权限 api路径权限验证
|
|
}
|
|
|
|
func (p *Permission) WithNeedToken(needToken bool) *Permission {
|
|
p.NeedToken = needToken
|
|
return p
|
|
}
|
|
|
|
func (p *Permission) WithNeedCasBin(needCasBin bool) *Permission {
|
|
p.NeedCasbin = needCasBin
|
|
return p
|
|
}
|