1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-03 10:17:03 +00:00

minor improvements

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-04-07 01:56:42 +03:00
parent dceb09d4ff
commit f17a325df6
6 changed files with 122 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/kataras/iris/v12/auth"
)
func allowRole(role AccessRole) auth.TVerify[User] {
func allowRole(role AccessRole) auth.VerifyUserFunc[User] {
return func(u User) error {
if !u.Role.Allow(role) {
return fmt.Errorf("invalid role")