generated from VLADIMIR/template
fix
This commit is contained in:
@@ -2,7 +2,6 @@ package roles
|
||||
|
||||
import "slices"
|
||||
|
||||
// subject — реализация IHasRole: субъект с фиксированным набором ролей.
|
||||
type subject struct {
|
||||
roles []string
|
||||
}
|
||||
@@ -12,7 +11,6 @@ func NewSubject(roles ...string) IHasRole {
|
||||
return &subject{roles: roles}
|
||||
}
|
||||
|
||||
// HasRole возвращает true, если роль есть в наборе ролей субъекта.
|
||||
func (s *subject) HasRole(role string) bool {
|
||||
return slices.Contains(s.roles, role)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user