Documentation ¶
Index ¶
- type ClientSection
- type ModulesAccess
- func (a *ModulesAccess) CheckPermission(rolesIds []int32, name string) bool
- func (a *ModulesAccess) CheckPrivilege(rolesIds []int32, name string) bool
- func (a *ModulesAccess) DefaultRole() string
- func (a *ModulesAccess) NewRoleGroup(roles []string) *RoleGroup
- func (a *ModulesAccess) RegisteredPermissions() []string
- func (a *ModulesAccess) RegisteredPrivileges() []string
- func (a *ModulesAccess) RegisteredRoles() []string
- type ModulesAccessOptions
- type RoleGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSection ¶
type ClientSection struct { Caption string // contains filtered or unexported fields }
func NewClientSection ¶
func NewClientSection(name string, caption string, priv string, access *ModulesAccess) *ClientSection
func (*ClientSection) MiddlewareWithPermission ¶
func (s *ClientSection) MiddlewareWithPermission(name string, next mrcore.HttpHandlerFunc) mrcore.HttpHandlerFunc
func (*ClientSection) Path ¶
func (s *ClientSection) Path(actionPath string) string
type ModulesAccess ¶
type ModulesAccess struct {
// contains filtered or unexported fields
}
func NewModulesAccess ¶
func NewModulesAccess(opt ModulesAccessOptions) (*ModulesAccess, error)
func (*ModulesAccess) CheckPermission ¶
func (a *ModulesAccess) CheckPermission(rolesIds []int32, name string) bool
func (*ModulesAccess) CheckPrivilege ¶
func (a *ModulesAccess) CheckPrivilege(rolesIds []int32, name string) bool
func (*ModulesAccess) DefaultRole ¶
func (a *ModulesAccess) DefaultRole() string
func (*ModulesAccess) NewRoleGroup ¶
func (a *ModulesAccess) NewRoleGroup(roles []string) *RoleGroup
func (*ModulesAccess) RegisteredPermissions ¶
func (a *ModulesAccess) RegisteredPermissions() []string
func (*ModulesAccess) RegisteredPrivileges ¶
func (a *ModulesAccess) RegisteredPrivileges() []string
func (*ModulesAccess) RegisteredRoles ¶
func (a *ModulesAccess) RegisteredRoles() []string
type ModulesAccessOptions ¶
Click to show internal directories.
Click to hide internal directories.