Documentation
¶
Overview ¶
Package acl provides the ACL (Access Control List) execution engine. ACLs filter available options in ticket forms based on current context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service evaluates ACLs to filter available options.
func NewService ¶
NewService creates a new ACL service.
func (*Service) FilterActions ¶
func (s *Service) FilterActions( ctx context.Context, aclCtx *models.ACLContext, actions []string, ) ([]string, error)
FilterActions evaluates ACLs and filters available actions. This is a convenience method for filtering action buttons.
func (*Service) FilterOptions ¶
func (s *Service) FilterOptions( ctx context.Context, aclCtx *models.ACLContext, returnType, returnSubType string, options map[int]string, ) (map[int]string, error)
FilterOptions evaluates ACLs and filters the available options. Parameters:
- ctx: context for database operations
- aclCtx: current ticket/user context for matching
- returnType: what to filter (e.g., "Ticket", "Action")
- returnSubType: specific field to filter (e.g., "State", "Queue", "Priority")
- options: map of ID -> name for available options
Returns filtered map of ID -> name.
Click to show internal directories.
Click to hide internal directories.