generated from VLADIMIR/template
clear
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package roles
|
||||
|
||||
// Роли пользователей системы.
|
||||
const (
|
||||
Admin = "admin"
|
||||
Author = "author"
|
||||
Organizer = "organizer"
|
||||
User = "user"
|
||||
)
|
||||
|
||||
// AllRoles — список всех ролей.
|
||||
var AllRoles = []string{
|
||||
Admin,
|
||||
Author,
|
||||
Organizer,
|
||||
User,
|
||||
}
|
||||
|
||||
// IHasRole — контракт субъекта, у которого можно проверить наличие роли.
|
||||
type IHasRole interface {
|
||||
HasRole(role string) bool
|
||||
}
|
||||
Reference in New Issue
Block a user