This commit is contained in:
2026-10-03 13:22:11 +07:00
parent 05090722a0
commit 2caa2c1a88
74 changed files with 44 additions and 676 deletions
-3
View File
@@ -1,7 +1,6 @@
// Package roles defines application roles and role checks.
package roles
// Роли пользователей системы.
const (
Admin = "admin"
Author = "author"
@@ -9,7 +8,6 @@ const (
User = "user"
)
// AllRoles — список всех ролей.
var AllRoles = []string{
Admin,
Author,
@@ -17,7 +15,6 @@ var AllRoles = []string{
User,
}
// IHasRole — контракт субъекта, у которого можно проверить наличие роли.
type IHasRole interface {
HasRole(role string) bool
}