Versions in this module Expand all Collapse all v1 v1.0.0 Mar 21, 2026 Changes in this version + type RolePermissionService struct + func NewRolePermissionService(repo repositories.RolePermissionRepository) *RolePermissionService + func (s *RolePermissionService) AddPermissionToRole(ctx context.Context, roleID string, permissionID string, ...) error + func (s *RolePermissionService) AssignRoleToUser(ctx context.Context, userID string, req types.AssignUserRoleRequest, ...) error + func (s *RolePermissionService) CreatePermission(ctx context.Context, req types.CreatePermissionRequest) (*types.Permission, error) + func (s *RolePermissionService) CreateRole(ctx context.Context, req types.CreateRoleRequest) (*types.Role, error) + func (s *RolePermissionService) DeletePermission(ctx context.Context, permissionID string) error + func (s *RolePermissionService) DeleteRole(ctx context.Context, roleID string) error + func (s *RolePermissionService) GetAllPermissions(ctx context.Context) ([]types.Permission, error) + func (s *RolePermissionService) GetAllRoles(ctx context.Context) ([]types.Role, error) + func (s *RolePermissionService) GetRoleByID(ctx context.Context, roleID string) (*types.RoleDetails, error) + func (s *RolePermissionService) GetRolePermissions(ctx context.Context, roleID string) ([]types.UserPermissionInfo, error) + func (s *RolePermissionService) RemovePermissionFromRole(ctx context.Context, roleID string, permissionID string) error + func (s *RolePermissionService) RemoveRoleFromUser(ctx context.Context, userID string, roleID string) error + func (s *RolePermissionService) ReplaceRolePermissions(ctx context.Context, roleID string, permissionIDs []string, ...) error + func (s *RolePermissionService) ReplaceUserRoles(ctx context.Context, userID string, roleIDs []string, assignedByUserID *string) error + func (s *RolePermissionService) UpdatePermission(ctx context.Context, permissionID string, req types.UpdatePermissionRequest) (*types.Permission, error) + func (s *RolePermissionService) UpdateRole(ctx context.Context, roleID string, req types.UpdateRoleRequest) (*types.Role, error) + type UserAccessService struct + func NewUserAccessService(repo repositories.UserAccessRepository) *UserAccessService + func (s *UserAccessService) GetUserAuthorizationProfile(ctx context.Context, userID string) (*types.UserAuthorizationProfile, error) + func (s *UserAccessService) GetUserEffectivePermissions(ctx context.Context, userID string) ([]types.UserPermissionInfo, error) + func (s *UserAccessService) GetUserRoles(ctx context.Context, userID string) ([]types.UserRoleInfo, error) + func (s *UserAccessService) GetUserWithPermissionsByID(ctx context.Context, userID string) (*types.UserWithPermissions, error) + func (s *UserAccessService) GetUserWithRolesByID(ctx context.Context, userID string) (*types.UserWithRoles, error) + func (s *UserAccessService) HasPermissions(ctx context.Context, userID string, requiredPermissions []string) (bool, error)