update roles

This commit is contained in:
2026-07-07 00:19:05 +07:00
parent 9af65d8a89
commit 612c3a6f86
2 changed files with 15 additions and 3 deletions
+12
View File
@@ -13,3 +13,15 @@ var AllRoles = []string{
Organizer,
User,
}
type IHasRole interface {
HasRole(role string) bool
}
func HasRole(claims IHasRole, role string) bool {
if claims.HasRole(Admin) {
return true
}
return claims.HasRole(role)
}