Dev (#2419)
* refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * feat(chalice): support table-of-browsers showing user-count * feat(chalice): support table-of-devices showing user-count * feat(chalice): support table-of-URLs showing user-count * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * feat(chalice): support table-of-browsers showing user-count * feat(chalice): support table-of-devices showing user-count * feat(chalice): support table-of-URLs showing user-count * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * refactor(chalice): refactored search sessions hooks * refactor(chalice): refactored schemas * refactor(chalice): refactored schemas refactor(chalice): cleaned scripts feat(chalice): search sessions by CSS selector (PG) * refactor(chalice): upgraded dependencies refactor(crons): upgraded dependencies refactor(alerts): upgraded dependencies * feat(chalice): search by selectors * feat(chalice): support Spot permissions feat(DB): support Spot permissions
This commit is contained in:
parent
b5387d8aa3
commit
8dc09ca691
2 changed files with 14 additions and 0 deletions
|
|
@ -16,6 +16,8 @@ class Permissions(str, Enum):
|
|||
ASSIST_LIVE = "ASSIST_LIVE"
|
||||
ASSIST_CALL = "ASSIST_CALL"
|
||||
FEATURE_FLAGS = "FEATURE_FLAGS"
|
||||
SPOT = "SPOT"
|
||||
SPOT_PUBLIC = "SPOT_PUBLIC"
|
||||
|
||||
|
||||
class ServicePermissions(str, Enum):
|
||||
|
|
@ -146,6 +148,7 @@ class AssistRecordSearchPayloadSchema(schemas._PaginatedSchema, schemas._TimedSc
|
|||
query: Optional[str] = Field(default=None)
|
||||
order: Literal["asc", "desc"] = Field(default="desc")
|
||||
|
||||
|
||||
# TODO: move these to schema when Insights is supported on PG
|
||||
class CardInsights(schemas.CardInsights):
|
||||
metric_value: List[InsightCategories] = Field(default=[])
|
||||
|
|
|
|||
|
|
@ -22,6 +22,17 @@ ALTER TABLE IF EXISTS events.clicks
|
|||
ALTER COLUMN normalized_x SET DATA TYPE decimal,
|
||||
ALTER COLUMN normalized_y SET DATA TYPE decimal;
|
||||
|
||||
UPDATE public.roles
|
||||
SET permissions = (SELECT array_agg(distinct e) FROM unnest(permissions || '{SPOT}') AS e)
|
||||
WHERE NOT permissions @> '{SPOT}'
|
||||
AND NOT service_role;
|
||||
|
||||
UPDATE public.roles
|
||||
SET permissions = (SELECT array_agg(distinct e) FROM unnest(permissions || '{SPOT_PUBLIC}') AS e)
|
||||
WHERE NOT permissions @> '{SPOT_PUBLIC}'
|
||||
AND name ILIKE 'owner';
|
||||
|
||||
|
||||
COMMIT;
|
||||
|
||||
\elif :is_next
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue