From 96110ec5f9e5b10c9a8023656e90a6adce3c8200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Thu, 28 May 2020 19:50:48 +0200 Subject: [PATCH] fix(swagger): added missing Permission type: dbrp (#18260) --- http/swagger.yml | 1 + ui/src/authorizations/utils/permissions.test.ts | 14 ++++++++++++++ ui/src/authorizations/utils/permissions.ts | 2 ++ 3 files changed, 17 insertions(+) diff --git a/http/swagger.yml b/http/swagger.yml index de269f28ca..2e3ce4d3d2 100644 --- a/http/swagger.yml +++ b/http/swagger.yml @@ -7393,6 +7393,7 @@ components: - notificationRules - notificationEndpoints - checks + - dbrp id: type: string nullable: true diff --git a/ui/src/authorizations/utils/permissions.test.ts b/ui/src/authorizations/utils/permissions.test.ts index 5e9bbd6ef3..da9bd5b80e 100644 --- a/ui/src/authorizations/utils/permissions.test.ts +++ b/ui/src/authorizations/utils/permissions.test.ts @@ -58,6 +58,20 @@ const hvhs: Permission[] = [ type: 'dashboards', }, }, + { + action: 'read', + resource: { + orgID: 'bulldogs', + type: 'dbrp', + }, + }, + { + action: 'write', + resource: { + orgID: 'bulldogs', + type: 'dbrp', + }, + }, { action: 'read', resource: { diff --git a/ui/src/authorizations/utils/permissions.ts b/ui/src/authorizations/utils/permissions.ts index 67ee4b9b59..5dc7c41f4e 100644 --- a/ui/src/authorizations/utils/permissions.ts +++ b/ui/src/authorizations/utils/permissions.ts @@ -11,6 +11,7 @@ const allPermissionTypes: PermissionTypes[] = [ 'buckets', 'checks', 'dashboards', + 'dbrp', 'documents', 'labels', 'notificationRules', @@ -36,6 +37,7 @@ const ensureT = (orgID: string) => (t: PermissionTypes): Permission[] => { case 'buckets': case 'checks': case 'dashboards': + case 'dbrp': case 'documents': case 'labels': case 'notificationRules':