Documentation ¶
Index ¶
- type AccessControl
- func (a *AccessControl) CheckPermission(rolesIDs []uint16, name string) bool
- func (a *AccessControl) CheckPrivilege(rolesIDs []uint16, name string) bool
- func (a *AccessControl) GuestRole() string
- func (a *AccessControl) HasPermission(name string) bool
- func (a *AccessControl) HasPrivilege(name string) bool
- func (a *AccessControl) NewAccessRights(roles ...string) mrcore.AccessRights
- func (a *AccessControl) RegisteredPermissions() []string
- func (a *AccessControl) RegisteredPrivileges() []string
- func (a *AccessControl) RegisteredRoles() []string
- type AccessControlOptions
- type AppSection
- type AppSectionOptions
- type RoleGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessControl ¶ added in v0.10.0
type AccessControl struct {
// contains filtered or unexported fields
}
func NewAccessControl ¶ added in v0.10.0
func NewAccessControl(opt AccessControlOptions) (*AccessControl, error)
func (*AccessControl) CheckPermission ¶ added in v0.10.0
func (a *AccessControl) CheckPermission(rolesIDs []uint16, name string) bool
func (*AccessControl) CheckPrivilege ¶ added in v0.10.0
func (a *AccessControl) CheckPrivilege(rolesIDs []uint16, name string) bool
func (*AccessControl) GuestRole ¶ added in v0.10.0
func (a *AccessControl) GuestRole() string
func (*AccessControl) HasPermission ¶ added in v0.10.0
func (a *AccessControl) HasPermission(name string) bool
func (*AccessControl) HasPrivilege ¶ added in v0.10.0
func (a *AccessControl) HasPrivilege(name string) bool
func (*AccessControl) NewAccessRights ¶ added in v0.10.0
func (a *AccessControl) NewAccessRights(roles ...string) mrcore.AccessRights
func (*AccessControl) RegisteredPermissions ¶ added in v0.10.0
func (a *AccessControl) RegisteredPermissions() []string
func (*AccessControl) RegisteredPrivileges ¶ added in v0.10.0
func (a *AccessControl) RegisteredPrivileges() []string
func (*AccessControl) RegisteredRoles ¶ added in v0.10.0
func (a *AccessControl) RegisteredRoles() []string
type AccessControlOptions ¶ added in v0.10.0
type AppSection ¶ added in v0.10.0
type AppSection struct {
// contains filtered or unexported fields
}
func NewAppSection ¶ added in v0.10.0
func NewAppSection(opt AppSectionOptions) *AppSection
func (*AppSection) Audience ¶ added in v0.10.0
func (s *AppSection) Audience() string
func (*AppSection) Caption ¶ added in v0.10.0
func (s *AppSection) Caption() string
func (*AppSection) Path ¶ added in v0.10.0
func (s *AppSection) Path(actionPath string) string
func (*AppSection) Privilege ¶ added in v0.10.0
func (s *AppSection) Privilege() string
func (*AppSection) Secret ¶ added in v0.10.0
func (s *AppSection) Secret() string
type AppSectionOptions ¶ added in v0.10.0
type RoleGroup ¶
type RoleGroup struct {
// contains filtered or unexported fields
}
func (*RoleGroup) CheckPermission ¶
func (*RoleGroup) CheckPrivilege ¶
func (*RoleGroup) IsGuestAccess ¶ added in v0.10.0
IsGuestAccess - если ролей нет или присутствует ровно одна роль и она гостевая
Click to show internal directories.
Click to hide internal directories.