Documentation ¶
Index ¶
- type Service
- func (s *Service) AccountCreate(c echo.Context, roleID rest.AccessRole, locationID int) error
- func (s *Service) EnforceLocation(c echo.Context, ID int) error
- func (s *Service) EnforceRole(c echo.Context, r rest.AccessRole) error
- func (s *Service) EnforceUser(c echo.Context, ID int) error
- func (s *Service) IsLowerRole(c echo.Context, r rest.AccessRole) error
- func (s *Service) User(c echo.Context) *rest.AuthUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct{}
Service is RBAC application service
func (*Service) AccountCreate ¶
AccountCreate performs auth check when creating a new account
func (*Service) EnforceLocation ¶
EnforceLocation checks whether the request to change location data is done by the user belonging to the requested location
func (*Service) EnforceRole ¶
EnforceRole authorizes request by AccessRole
func (*Service) EnforceUser ¶
EnforceUser checks whether the request to change user data is done by the same user
func (*Service) IsLowerRole ¶
IsLowerRole checks whether the requesting user has higher role than the user it wants to change Used for account creation/deletion
Click to show internal directories.
Click to hide internal directories.