Daniel 2024-06-15 11:19:36 +08:00
parent f293933802
commit 8bdd59a156
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 14 additions and 2 deletions

View file

@ -54,3 +54,7 @@ func GetGinContextRole(c *gin.Context) Role {
return RoleVisitor
}
}
func IsAdminRoleContext(c *gin.Context) bool {
return GetGinContextRole(c) == RoleAdministrator
}