Skip to content

Commit 54ef860

Browse files
feat(auth-4121): add support for sessionAcl proto type (#1296)
The access-management PR cognitedata/fusion#13753, tried to introduce a change to provide predefined capability groups. Since the SDK didn't expose the sessionsAcl type we had to rely on defining a type within the PR which is undesirable, preferably the SDK would've supported it. This change introduces the proto definitions found in api_acls: https://github.com/cognitedata/infrastructure/blob/master/lib/proto/api_acls/cogmono/api_acls/sessions_acl/sessions_acl.proto. Ticket: https://cognitedata.atlassian.net/browse/AUTH-4121 Note: this PR was made with cursor 🚀
1 parent 90ea5bc commit 54ef860

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/stable/src/types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export type AclActionTimeseries = READ | WRITE;
8181

8282
export type AclActionUsers = LIST | CREATE | DELETE;
8383

84+
export type AclActionSessions = LIST | CREATE | DELETE;
85+
8486
export type AclAnalytics = Acl<AclActionAnalytics, AclScopeAnalytics>;
8587

8688
export type AclAssets = Acl<AclActionAssets, AclScopeAssets>;
@@ -190,6 +192,8 @@ export type AclScopeTimeseries =
190192

191193
export type AclScopeUsers = AclScopeAll;
192194

195+
export type AclScopeSessions = AclScopeAll;
196+
193197
export type AclSecurityCategories = Acl<
194198
AclActionSecurityCategories,
195199
AclScopeSecurityCategories
@@ -201,6 +205,8 @@ export type AclTimeseries = Acl<AclActionTimeseries, AclScopeTimeseries>;
201205

202206
export type AclUsers = Acl<AclActionUsers, AclScopeUsers>;
203207

208+
export type AclSessions = Acl<AclActionSessions, AclScopeSessions>;
209+
204210
export type Aggregate =
205211
| 'average'
206212
| 'max'
@@ -2302,7 +2308,8 @@ export type SingleCogniteCapability =
23022308
| { templateGroupsAcl: AclTemplateGroups }
23032309
| { templateInstancesAcl: AclTemplateInstances }
23042310
| { dataModelAcl: AclDataModel }
2305-
| { dataModelInstancesAcl: AclDataModelInstances };
2311+
| { dataModelInstancesAcl: AclDataModelInstances }
2312+
| { sessionsAcl: AclSessions };
23062313

23072314
export type SinglePatch<T> = { set: T } | { setNull: boolean };
23082315
export type SinglePatchRequired<T> = { set: T };

0 commit comments

Comments
 (0)