@lightdash/common 0.1930.3 → 0.1932.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/authorization/parseScopes.d.ts +8 -0
- package/dist/cjs/authorization/parseScopes.d.ts.map +1 -0
- package/dist/cjs/authorization/parseScopes.js +27 -0
- package/dist/cjs/authorization/parseScopes.js.map +1 -0
- package/dist/cjs/authorization/parseScopes.test.d.ts +2 -0
- package/dist/cjs/authorization/parseScopes.test.d.ts.map +1 -0
- package/dist/cjs/authorization/parseScopes.test.js +109 -0
- package/dist/cjs/authorization/parseScopes.test.js.map +1 -0
- package/dist/cjs/authorization/scopeAbilityBuilder.d.ts +23 -0
- package/dist/cjs/authorization/scopeAbilityBuilder.d.ts.map +1 -0
- package/dist/cjs/authorization/scopeAbilityBuilder.js +58 -0
- package/dist/cjs/authorization/scopeAbilityBuilder.js.map +1 -0
- package/dist/cjs/authorization/scopeAbilityBuilder.test.d.ts +2 -0
- package/dist/cjs/authorization/scopeAbilityBuilder.test.d.ts.map +1 -0
- package/dist/cjs/authorization/scopeAbilityBuilder.test.js +955 -0
- package/dist/cjs/authorization/scopeAbilityBuilder.test.js.map +1 -0
- package/dist/cjs/authorization/scopes.d.ts +8 -0
- package/dist/cjs/authorization/scopes.d.ts.map +1 -0
- package/dist/cjs/authorization/scopes.js +633 -0
- package/dist/cjs/authorization/scopes.js.map +1 -0
- package/dist/cjs/types/scopes.d.ts +30 -3
- package/dist/cjs/types/scopes.d.ts.map +1 -1
- package/dist/cjs/types/scopes.js.map +1 -1
- package/dist/cjs/types/search.d.ts +1 -0
- package/dist/cjs/types/search.d.ts.map +1 -1
- package/dist/cjs/types/search.js.map +1 -1
- package/dist/esm/authorization/parseScopes.d.ts +8 -0
- package/dist/esm/authorization/parseScopes.d.ts.map +1 -0
- package/dist/esm/authorization/parseScopes.js +22 -0
- package/dist/esm/authorization/parseScopes.js.map +1 -0
- package/dist/esm/authorization/parseScopes.test.d.ts +2 -0
- package/dist/esm/authorization/parseScopes.test.d.ts.map +1 -0
- package/dist/esm/authorization/parseScopes.test.js +107 -0
- package/dist/esm/authorization/parseScopes.test.js.map +1 -0
- package/dist/esm/authorization/scopeAbilityBuilder.d.ts +23 -0
- package/dist/esm/authorization/scopeAbilityBuilder.d.ts.map +1 -0
- package/dist/esm/authorization/scopeAbilityBuilder.js +54 -0
- package/dist/esm/authorization/scopeAbilityBuilder.js.map +1 -0
- package/dist/esm/authorization/scopeAbilityBuilder.test.d.ts +2 -0
- package/dist/esm/authorization/scopeAbilityBuilder.test.d.ts.map +1 -0
- package/dist/esm/authorization/scopeAbilityBuilder.test.js +953 -0
- package/dist/esm/authorization/scopeAbilityBuilder.test.js.map +1 -0
- package/dist/esm/authorization/scopes.d.ts +8 -0
- package/dist/esm/authorization/scopes.d.ts.map +1 -0
- package/dist/esm/authorization/scopes.js +628 -0
- package/dist/esm/authorization/scopes.js.map +1 -0
- package/dist/esm/types/scopes.d.ts +30 -3
- package/dist/esm/types/scopes.d.ts.map +1 -1
- package/dist/esm/types/scopes.js.map +1 -1
- package/dist/esm/types/search.d.ts +1 -0
- package/dist/esm/types/search.d.ts.map +1 -1
- package/dist/esm/types/search.js.map +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authorization/parseScopes.d.ts +8 -0
- package/dist/types/authorization/parseScopes.d.ts.map +1 -0
- package/dist/types/authorization/parseScopes.test.d.ts +2 -0
- package/dist/types/authorization/parseScopes.test.d.ts.map +1 -0
- package/dist/types/authorization/scopeAbilityBuilder.d.ts +23 -0
- package/dist/types/authorization/scopeAbilityBuilder.d.ts.map +1 -0
- package/dist/types/authorization/scopeAbilityBuilder.test.d.ts +2 -0
- package/dist/types/authorization/scopeAbilityBuilder.test.d.ts.map +1 -0
- package/dist/types/authorization/scopes.d.ts +8 -0
- package/dist/types/authorization/scopes.d.ts.map +1 -0
- package/dist/types/types/scopes.d.ts +30 -3
- package/dist/types/types/scopes.d.ts.map +1 -1
- package/dist/types/types/search.d.ts +1 -0
- package/dist/types/types/search.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/authorization/scopes/index.d.ts +0 -5
- package/dist/cjs/authorization/scopes/index.d.ts.map +0 -1
- package/dist/cjs/authorization/scopes/index.js +0 -372
- package/dist/cjs/authorization/scopes/index.js.map +0 -1
- package/dist/esm/authorization/scopes/index.d.ts +0 -5
- package/dist/esm/authorization/scopes/index.d.ts.map +0 -1
- package/dist/esm/authorization/scopes/index.js +0 -368
- package/dist/esm/authorization/scopes/index.js.map +0 -1
- package/dist/types/authorization/scopes/index.d.ts +0 -5
- package/dist/types/authorization/scopes/index.d.ts.map +0 -1
@@ -0,0 +1,8 @@
|
|
1
|
+
import { type ScopeName } from '../types/scopes';
|
2
|
+
import { type AbilityAction, type CaslSubjectNames } from './types';
|
3
|
+
export declare const parseScope: (scope: string) => [AbilityAction, CaslSubjectNames];
|
4
|
+
export declare const parseScopes: ({ scopes, isEnterprise, }: {
|
5
|
+
scopes: string[];
|
6
|
+
isEnterprise: boolean;
|
7
|
+
}) => Set<ScopeName>;
|
8
|
+
//# sourceMappingURL=parseScopes.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parseScopes.d.ts","sourceRoot":"","sources":["../../../src/authorization/parseScopes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,UAAU,UACZ,MAAM,KACd,CAAC,aAAa,EAAE,gBAAgB,CAKlC,CAAC;AAEF,eAAO,MAAM,WAAW,8BAGrB;IACC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;CACzB,KAAG,GAAG,CAAC,SAAS,CAiBhB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parseScopes.test.d.ts","sourceRoot":"","sources":["../../../src/authorization/parseScopes.test.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { type MemberAbility } from './types';
|
2
|
+
type BuilderOptions = {
|
3
|
+
organizationUuid: string;
|
4
|
+
projectUuid: string;
|
5
|
+
userUuid?: string;
|
6
|
+
scopes: string[];
|
7
|
+
isEnterprise: boolean;
|
8
|
+
organizationRole: string;
|
9
|
+
permissionsConfig?: {
|
10
|
+
pat: {
|
11
|
+
enabled: boolean;
|
12
|
+
allowedOrgRoles: string[];
|
13
|
+
};
|
14
|
+
};
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* Build a complete CASL ability from scope names and context
|
18
|
+
* @param context - Context containing organization, project, user, and space access information
|
19
|
+
* @returns CASL Ability with applied permissions
|
20
|
+
*/
|
21
|
+
export declare const buildAbilityFromScopes: (context: BuilderOptions) => MemberAbility;
|
22
|
+
export {};
|
23
|
+
//# sourceMappingURL=scopeAbilityBuilder.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"scopeAbilityBuilder.d.ts","sourceRoot":"","sources":["../../../src/authorization/scopeAbilityBuilder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAoD7C,KAAK,cAAc,GAAG;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE;QAChB,GAAG,EAAE;YACD,OAAO,EAAE,OAAO,CAAC;YACjB,eAAe,EAAE,MAAM,EAAE,CAAC;SAC7B,CAAC;KACL,CAAC;CACL,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,YACtB,cAAc,KACxB,aAcF,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"scopeAbilityBuilder.test.d.ts","sourceRoot":"","sources":["../../../src/authorization/scopeAbilityBuilder.test.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { type Scope, type ScopeName } from '../types/scopes';
|
2
|
+
export declare const getScopes: ({ isEnterprise }?: {
|
3
|
+
isEnterprise?: boolean | undefined;
|
4
|
+
}) => Scope[];
|
5
|
+
export declare const getAllScopeMap: ({ isEnterprise }?: {
|
6
|
+
isEnterprise?: boolean | undefined;
|
7
|
+
}) => Record<ScopeName, Scope>;
|
8
|
+
//# sourceMappingURL=scopes.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../src/authorization/scopes.ts"],"names":[],"mappings":"AACA,OAAO,EACH,KAAK,KAAK,EAGV,KAAK,SAAS,EACjB,MAAM,iBAAiB,CAAC;AAmoBzB,eAAO,MAAM,SAAS;;MAAoC,KAAK,EACX,CAAC;AAErD,eAAO,MAAM,cAAc;;MAAoC,MAAM,CACjE,SAAS,EACT,KAAK,CAQJ,CAAC"}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { type SnakeCase } from 'type-fest';
|
2
1
|
import { type AbilityAction, type CaslSubjectNames } from '../authorization/types';
|
3
2
|
/**
|
4
3
|
* Scope groups to organize permissions in the UI for admins.
|
@@ -12,14 +11,38 @@ export declare enum ScopeGroup {
|
|
12
11
|
AI = "ai",
|
13
12
|
SPOTLIGHT = "spotlight"
|
14
13
|
}
|
14
|
+
/**
|
15
|
+
* Context given to scope getCondition functions
|
16
|
+
*/
|
17
|
+
export type ScopeContext = {
|
18
|
+
organizationUuid: string;
|
19
|
+
projectUuid: string;
|
20
|
+
userUuid?: string;
|
21
|
+
/** The scopes available to the current user */
|
22
|
+
scopes: Set<ScopeName>;
|
23
|
+
isEnterprise: boolean;
|
24
|
+
/** The user's role name in the organization (for dynamic permission logic) */
|
25
|
+
organizationRole: string;
|
26
|
+
/** Configuration for dynamic permissions like PAT */
|
27
|
+
permissionsConfig?: {
|
28
|
+
pat: {
|
29
|
+
enabled: boolean;
|
30
|
+
allowedOrgRoles: string[];
|
31
|
+
};
|
32
|
+
};
|
33
|
+
};
|
34
|
+
/**
|
35
|
+
* The name of the scope, based on ability and subject (e.g. "create:project")
|
36
|
+
*/
|
37
|
+
export type ScopeName = `${AbilityAction}:${CaslSubjectNames}`;
|
15
38
|
/**
|
16
39
|
* A scope defines a specific permission in the system
|
17
40
|
*/
|
18
41
|
export type Scope = {
|
19
42
|
/**
|
20
|
-
* The name of the scope, based on ability and subject (e.g. "create:
|
43
|
+
* The name of the scope, based on ability and subject (e.g. "create:Project")
|
21
44
|
*/
|
22
|
-
name:
|
45
|
+
name: ScopeName;
|
23
46
|
/**
|
24
47
|
* A helpful description of the permission
|
25
48
|
*/
|
@@ -32,5 +55,9 @@ export type Scope = {
|
|
32
55
|
* The grouping from the ScopeGroup enum
|
33
56
|
*/
|
34
57
|
group: ScopeGroup;
|
58
|
+
/**
|
59
|
+
* Get the conditions to be applied to the CASL ability derived from the scope
|
60
|
+
*/
|
61
|
+
getConditions?: (context: ScopeContext) => Record<string, unknown>[];
|
35
62
|
};
|
36
63
|
//# sourceMappingURL=scopes.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../src/types/scopes.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../src/types/scopes.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACxB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,oBAAY,UAAU;IAClB,OAAO,YAAY;IACnB,kBAAkB,uBAAuB;IACzC,uBAAuB,4BAA4B;IACnD,IAAI,SAAS;IACb,OAAO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scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAc,MAAM,oBAAoB,CAAC;AAwX5D,eAAO,MAAM,SAAS;;MAAoC,KAAK,EACX,CAAC"}
|
@@ -1,372 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getScopes = void 0;
|
4
|
-
const scopes_1 = require("../../types/scopes");
|
5
|
-
const scopes = [
|
6
|
-
{
|
7
|
-
name: 'view:dashboard',
|
8
|
-
description: 'View dashboards',
|
9
|
-
isEnterprise: false,
|
10
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
11
|
-
},
|
12
|
-
{
|
13
|
-
name: 'manage:dashboard',
|
14
|
-
description: 'Create, edit, and delete dashboards',
|
15
|
-
isEnterprise: false,
|
16
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
17
|
-
},
|
18
|
-
{
|
19
|
-
name: 'view:saved_chart',
|
20
|
-
description: 'View saved charts',
|
21
|
-
isEnterprise: false,
|
22
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
23
|
-
},
|
24
|
-
{
|
25
|
-
name: 'manage:saved_chart',
|
26
|
-
description: 'Create, edit, and delete saved charts',
|
27
|
-
isEnterprise: false,
|
28
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
29
|
-
},
|
30
|
-
{
|
31
|
-
name: 'view:space',
|
32
|
-
description: 'View spaces',
|
33
|
-
isEnterprise: false,
|
34
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
35
|
-
},
|
36
|
-
{
|
37
|
-
name: 'create:space',
|
38
|
-
description: 'Create new spaces',
|
39
|
-
isEnterprise: false,
|
40
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
41
|
-
},
|
42
|
-
{
|
43
|
-
name: 'manage:space',
|
44
|
-
description: 'Edit and delete spaces',
|
45
|
-
isEnterprise: false,
|
46
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
47
|
-
},
|
48
|
-
{
|
49
|
-
name: 'view:dashboard_comments',
|
50
|
-
description: 'View dashboard comments',
|
51
|
-
isEnterprise: false,
|
52
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
53
|
-
},
|
54
|
-
{
|
55
|
-
name: 'create:dashboard_comments',
|
56
|
-
description: 'Create dashboard comments',
|
57
|
-
isEnterprise: false,
|
58
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
59
|
-
},
|
60
|
-
{
|
61
|
-
name: 'manage:dashboard_comments',
|
62
|
-
description: 'Edit and delete dashboard comments',
|
63
|
-
isEnterprise: false,
|
64
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
65
|
-
},
|
66
|
-
{
|
67
|
-
name: 'view:tags',
|
68
|
-
description: 'View tags',
|
69
|
-
isEnterprise: false,
|
70
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
71
|
-
},
|
72
|
-
{
|
73
|
-
name: 'manage:tags',
|
74
|
-
description: 'Create, edit, and delete tags',
|
75
|
-
isEnterprise: false,
|
76
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
77
|
-
},
|
78
|
-
{
|
79
|
-
name: 'view:pinned_items',
|
80
|
-
description: 'View pinned items',
|
81
|
-
isEnterprise: false,
|
82
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
83
|
-
},
|
84
|
-
{
|
85
|
-
name: 'manage:pinned_items',
|
86
|
-
description: 'Pin and unpin items',
|
87
|
-
isEnterprise: false,
|
88
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
89
|
-
},
|
90
|
-
{
|
91
|
-
name: 'promote:saved_chart',
|
92
|
-
description: 'Promote saved charts to spaces',
|
93
|
-
isEnterprise: false,
|
94
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
95
|
-
},
|
96
|
-
{
|
97
|
-
name: 'promote:dashboard',
|
98
|
-
description: 'Promote dashboards to spaces',
|
99
|
-
isEnterprise: false,
|
100
|
-
group: scopes_1.ScopeGroup.CONTENT,
|
101
|
-
},
|
102
|
-
// Project Management Scopes
|
103
|
-
{
|
104
|
-
name: 'view:project',
|
105
|
-
description: 'View project details',
|
106
|
-
isEnterprise: false,
|
107
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
108
|
-
},
|
109
|
-
{
|
110
|
-
name: 'create:project',
|
111
|
-
description: 'Create new projects',
|
112
|
-
isEnterprise: false,
|
113
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
114
|
-
},
|
115
|
-
{
|
116
|
-
name: 'update:project',
|
117
|
-
description: 'Update project settings',
|
118
|
-
isEnterprise: false,
|
119
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
120
|
-
},
|
121
|
-
{
|
122
|
-
name: 'delete:project',
|
123
|
-
description: 'Delete projects',
|
124
|
-
isEnterprise: false,
|
125
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
126
|
-
},
|
127
|
-
{
|
128
|
-
name: 'manage:project',
|
129
|
-
description: 'Full project management permissions',
|
130
|
-
isEnterprise: false,
|
131
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
132
|
-
},
|
133
|
-
{
|
134
|
-
name: 'manage:compile_project',
|
135
|
-
description: 'Compile and refresh dbt projects',
|
136
|
-
isEnterprise: false,
|
137
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
138
|
-
},
|
139
|
-
{
|
140
|
-
name: 'manage:validation',
|
141
|
-
description: 'Manage data validation rules',
|
142
|
-
isEnterprise: false,
|
143
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
144
|
-
},
|
145
|
-
{
|
146
|
-
name: 'create:scheduled_deliveries',
|
147
|
-
description: 'Create scheduled deliveries',
|
148
|
-
isEnterprise: false,
|
149
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
150
|
-
},
|
151
|
-
{
|
152
|
-
name: 'manage:scheduled_deliveries',
|
153
|
-
description: 'Manage scheduled deliveries',
|
154
|
-
isEnterprise: false,
|
155
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
156
|
-
},
|
157
|
-
{
|
158
|
-
name: 'view:analytics',
|
159
|
-
description: 'View usage analytics',
|
160
|
-
isEnterprise: false,
|
161
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
162
|
-
},
|
163
|
-
{
|
164
|
-
name: 'create:job',
|
165
|
-
description: 'Create background jobs',
|
166
|
-
isEnterprise: false,
|
167
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
168
|
-
},
|
169
|
-
{
|
170
|
-
name: 'view:job',
|
171
|
-
description: 'View job details',
|
172
|
-
isEnterprise: false,
|
173
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
174
|
-
},
|
175
|
-
{
|
176
|
-
name: 'manage:job',
|
177
|
-
description: 'Manage background jobs',
|
178
|
-
isEnterprise: false,
|
179
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
180
|
-
},
|
181
|
-
{
|
182
|
-
name: 'view:job_status',
|
183
|
-
description: 'View job status',
|
184
|
-
isEnterprise: false,
|
185
|
-
group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
|
186
|
-
},
|
187
|
-
// Organization Management Scopes
|
188
|
-
{
|
189
|
-
name: 'view:organization',
|
190
|
-
description: 'View organization details',
|
191
|
-
isEnterprise: false,
|
192
|
-
group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
|
193
|
-
},
|
194
|
-
{
|
195
|
-
name: 'manage:organization',
|
196
|
-
description: 'Manage organization settings',
|
197
|
-
isEnterprise: false,
|
198
|
-
group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
|
199
|
-
},
|
200
|
-
{
|
201
|
-
name: 'view:organization_member_profile',
|
202
|
-
description: 'View organization member profiles',
|
203
|
-
isEnterprise: false,
|
204
|
-
group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
|
205
|
-
},
|
206
|
-
{
|
207
|
-
name: 'manage:organization_member_profile',
|
208
|
-
description: 'Manage organization member profiles and roles',
|
209
|
-
isEnterprise: false,
|
210
|
-
group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
|
211
|
-
},
|
212
|
-
{
|
213
|
-
name: 'manage:invite_link',
|
214
|
-
description: 'Create and manage invite links',
|
215
|
-
isEnterprise: false,
|
216
|
-
group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
|
217
|
-
},
|
218
|
-
{
|
219
|
-
name: 'manage:group',
|
220
|
-
description: 'Manage user groups',
|
221
|
-
isEnterprise: false,
|
222
|
-
group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
|
223
|
-
},
|
224
|
-
{
|
225
|
-
name: 'manage:content_as_code',
|
226
|
-
description: 'Manage content as code features',
|
227
|
-
isEnterprise: true,
|
228
|
-
group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
|
229
|
-
},
|
230
|
-
// Data Scopes
|
231
|
-
{
|
232
|
-
name: 'view:underlying_data',
|
233
|
-
description: 'View underlying data in charts',
|
234
|
-
isEnterprise: false,
|
235
|
-
group: scopes_1.ScopeGroup.DATA,
|
236
|
-
},
|
237
|
-
{
|
238
|
-
name: 'view:semantic_viewer',
|
239
|
-
description: 'View data in semantic viewer',
|
240
|
-
isEnterprise: false,
|
241
|
-
group: scopes_1.ScopeGroup.DATA,
|
242
|
-
},
|
243
|
-
{
|
244
|
-
name: 'manage:semantic_viewer',
|
245
|
-
description: 'Create and edit semantic viewer queries',
|
246
|
-
isEnterprise: false,
|
247
|
-
group: scopes_1.ScopeGroup.DATA,
|
248
|
-
},
|
249
|
-
{
|
250
|
-
name: 'manage:explore',
|
251
|
-
description: 'Explore and query data',
|
252
|
-
isEnterprise: false,
|
253
|
-
group: scopes_1.ScopeGroup.DATA,
|
254
|
-
},
|
255
|
-
{
|
256
|
-
name: 'manage:sql_runner',
|
257
|
-
description: 'Run SQL queries directly',
|
258
|
-
isEnterprise: false,
|
259
|
-
group: scopes_1.ScopeGroup.DATA,
|
260
|
-
},
|
261
|
-
{
|
262
|
-
name: 'manage:custom_sql',
|
263
|
-
description: 'Create custom SQL queries',
|
264
|
-
isEnterprise: false,
|
265
|
-
group: scopes_1.ScopeGroup.DATA,
|
266
|
-
},
|
267
|
-
{
|
268
|
-
name: 'manage:virtual_view',
|
269
|
-
description: 'Create and manage virtual views',
|
270
|
-
isEnterprise: false,
|
271
|
-
group: scopes_1.ScopeGroup.DATA,
|
272
|
-
},
|
273
|
-
{
|
274
|
-
name: 'manage:export_csv',
|
275
|
-
description: 'Export data to CSV',
|
276
|
-
isEnterprise: false,
|
277
|
-
group: scopes_1.ScopeGroup.DATA,
|
278
|
-
},
|
279
|
-
{
|
280
|
-
name: 'manage:change_csv_results',
|
281
|
-
description: 'Modify CSV export results',
|
282
|
-
isEnterprise: false,
|
283
|
-
group: scopes_1.ScopeGroup.DATA,
|
284
|
-
},
|
285
|
-
// Sharing Scopes
|
286
|
-
{
|
287
|
-
name: 'export:dashboard_csv',
|
288
|
-
description: 'Can export dashboards and charts to CSV',
|
289
|
-
isEnterprise: false,
|
290
|
-
group: scopes_1.ScopeGroup.SHARING,
|
291
|
-
},
|
292
|
-
{
|
293
|
-
name: 'export:dashboard_image',
|
294
|
-
description: 'Can export dashboards and charts to images',
|
295
|
-
isEnterprise: false,
|
296
|
-
group: scopes_1.ScopeGroup.SHARING,
|
297
|
-
},
|
298
|
-
{
|
299
|
-
name: 'export:dashboard_pdf',
|
300
|
-
description: 'Can export dashboards and charts to PDF',
|
301
|
-
isEnterprise: false,
|
302
|
-
group: scopes_1.ScopeGroup.SHARING,
|
303
|
-
},
|
304
|
-
// AI Agent
|
305
|
-
{
|
306
|
-
name: 'manage:personal_access_token',
|
307
|
-
description: 'Create and manage personal access tokens',
|
308
|
-
isEnterprise: true,
|
309
|
-
group: scopes_1.ScopeGroup.AI,
|
310
|
-
},
|
311
|
-
{
|
312
|
-
name: 'view:ai_agent',
|
313
|
-
description: 'View AI agent features',
|
314
|
-
isEnterprise: true,
|
315
|
-
group: scopes_1.ScopeGroup.AI,
|
316
|
-
},
|
317
|
-
{
|
318
|
-
name: 'manage:ai_agent',
|
319
|
-
description: 'Configure AI agent settings',
|
320
|
-
isEnterprise: true,
|
321
|
-
group: scopes_1.ScopeGroup.AI,
|
322
|
-
},
|
323
|
-
{
|
324
|
-
name: 'view:ai_agent_thread',
|
325
|
-
description: 'View AI agent conversation threads',
|
326
|
-
isEnterprise: true,
|
327
|
-
group: scopes_1.ScopeGroup.AI,
|
328
|
-
},
|
329
|
-
{
|
330
|
-
name: 'create:ai_agent_thread',
|
331
|
-
description: 'Start new AI agent conversations',
|
332
|
-
isEnterprise: true,
|
333
|
-
group: scopes_1.ScopeGroup.AI,
|
334
|
-
},
|
335
|
-
{
|
336
|
-
name: 'manage:ai_agent_thread',
|
337
|
-
description: 'Manage AI agent conversation threads',
|
338
|
-
isEnterprise: true,
|
339
|
-
group: scopes_1.ScopeGroup.AI,
|
340
|
-
},
|
341
|
-
// Spotlight Scopes
|
342
|
-
{
|
343
|
-
name: 'manage:spotlight_table_config',
|
344
|
-
description: 'Configure spotlight table settings',
|
345
|
-
isEnterprise: true,
|
346
|
-
group: scopes_1.ScopeGroup.SPOTLIGHT,
|
347
|
-
},
|
348
|
-
{
|
349
|
-
name: 'view:spotlight_table_config',
|
350
|
-
description: 'View spotlight table configuration',
|
351
|
-
isEnterprise: true,
|
352
|
-
group: scopes_1.ScopeGroup.SPOTLIGHT,
|
353
|
-
},
|
354
|
-
{
|
355
|
-
name: 'view:metrics_tree',
|
356
|
-
description: 'View metrics tree',
|
357
|
-
isEnterprise: true,
|
358
|
-
group: scopes_1.ScopeGroup.SPOTLIGHT,
|
359
|
-
},
|
360
|
-
{
|
361
|
-
name: 'manage:metrics_tree',
|
362
|
-
description: 'Manage metrics tree configuration',
|
363
|
-
isEnterprise: true,
|
364
|
-
group: scopes_1.ScopeGroup.SPOTLIGHT,
|
365
|
-
},
|
366
|
-
];
|
367
|
-
const getNonEnterpriseScopes = () => scopes.filter((scope) => !scope.isEnterprise);
|
368
|
-
// We will be using this
|
369
|
-
// eslint-disable-next-line import/export
|
370
|
-
const getScopes = ({ isEnterprise = false } = {}) => isEnterprise ? scopes : getNonEnterpriseScopes();
|
371
|
-
exports.getScopes = getScopes;
|
372
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/authorization/scopes/index.ts"],"names":[],"mappings":";;;AAAA,+CAA4D;AAE5D,MAAM,MAAM,GAAY;IACpB;QACI,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,iBAAiB;QAC9B,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,mBAAU,CAAC,OAAO;KAC5B;IACD;QACI,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,qCAAqC;QAClD,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,mBAAU,CAAC,OAAO;KAC5B;IACD;QACI,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,mBAAmB;QAChC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,mBAAU,CAAC,OAAO;KAC5B;IACD;QACI,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,uCAAuC;QACpD,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,mBAAU,CAAC,OAAO;KAC5B;IACD;QACI,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,aAAa;QAC1B,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,mBAAU,CAAC,OAAO;KAC5B;IACD;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,mBAAmB;QAChC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,mBAAU,CAAC,OAAO;KAC5B;IACD;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,wBAAwB;QACrC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,mBAAU,CAAC,OAAO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+B;QACrC,WAAW,EAAE,oCAAoC;QACjD,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,mBAAU,CAAC,SAAS;KAC9B;IACD;QACI,IAAI,EAAE,6BAA6B;QACnC,WAAW,EAAE,oCAAoC;QACjD,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,mBAAU,CAAC,SAAS;KAC9B;IACD;QACI,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,mBAAmB;QAChC,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,mBAAU,CAAC,SAAS;KAC9B;IACD;QACI,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,mCAAmC;QAChD,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,mBAAU,CAAC,SAAS;KAC9B;CACJ,CAAC;AAEF,MAAM,sBAAsB,GAAG,GAAY,EAAE,CACzC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAElD,wBAAwB;AACxB,yCAAyC;AAClC,MAAM,SAAS,GAAG,CAAC,EAAE,YAAY,GAAG,KAAK,EAAE,GAAG,EAAE,EAAW,EAAE,CAChE,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAsB,EAAE,CAAC;AADxC,QAAA,SAAS,aAC+B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/authorization/scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAc,MAAM,oBAAoB,CAAC;AAwX5D,eAAO,MAAM,SAAS;;MAAoC,KAAK,EACX,CAAC"}
|