package dashboard

import (
	"context"

	"github.com/nexuscrm/shared/pkg/models"
)

// DashboardEffectiveUserPolicy owns the product-specific rule for choosing the
// user whose permissions and RLS context execute dashboard component reports.
type DashboardEffectiveUserPolicy interface {
	EffectiveUser(ctx context.Context, req DashboardEffectiveUserRequest) (*models.UserSession, error)
}

type DashboardEffectiveUserRequest struct {
	DashboardID string
	Definition  *Definition
	Viewer      *models.UserSession
}
