Skip to content

Commit 5d132b6

Browse files
feat: add remotes and replications OSS resource types (#3341)
* feat: add remotes and replications OSS resource types * chore: prettier
1 parent 7271849 commit 5d132b6

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

src/authorizations/utils/permissions.test.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,34 @@ const ossHvhs = [
169169
type: 'orgs',
170170
},
171171
},
172+
{
173+
action: 'read',
174+
resource: {
175+
orgID: 'bulldogs',
176+
type: 'remotes',
177+
},
178+
},
179+
{
180+
action: 'write',
181+
resource: {
182+
orgID: 'bulldogs',
183+
type: 'remotes',
184+
},
185+
},
186+
{
187+
action: 'read',
188+
resource: {
189+
orgID: 'bulldogs',
190+
type: 'replications',
191+
},
192+
},
193+
{
194+
action: 'write',
195+
resource: {
196+
orgID: 'bulldogs',
197+
type: 'replications',
198+
},
199+
},
172200
{
173201
action: 'read',
174202
resource: {

src/authorizations/utils/permissions.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ const sharedPermissionTypes: PermissionTypes[] = [
2626

2727
const cloudPermissionTypes = ['flows', 'functions']
2828

29-
const ossPermissionTypes = ['notebooks', 'scrapers', 'sources']
29+
const ossPermissionTypes = [
30+
'notebooks',
31+
'scrapers',
32+
'sources',
33+
'remotes',
34+
'replications',
35+
]
3036

3137
// TODO: replace this with some server side mechanism
3238
const allPermissionTypes: PermissionTypes[] = sharedPermissionTypes.concat(

0 commit comments

Comments
 (0)