package mock import ( "context" "tera-clone/services/tera-api/internal/domain" ) func logPortVisible(ctx context.Context, channel string) bool { actor, ok := domain.ActorFromContext(ctx) if !ok { return true } access := actor.PortAccess if access == nil { access = defaultPortAccessForRole(actor.Role) } return access[channel] == "read" || access[channel] == "write" }