@@ -12,7 +12,7 @@ import type { FileTree } from "utils/filetree";
12
12
import type { TemplateVersionFiles } from "utils/templateVersion" ;
13
13
14
14
export const MockOrganization : TypesGen . Organization = {
15
- id : "fc0774ce-cc9e-48d4-80ae-88f7a4d4a8b0 " ,
15
+ id : "my-organization-id " ,
16
16
name : "my-organization" ,
17
17
display_name : "My Organization" ,
18
18
description : "An organization that gets used for stuff." ,
@@ -27,6 +27,17 @@ export const MockDefaultOrganization: TypesGen.Organization = {
27
27
is_default : true ,
28
28
} ;
29
29
30
+ export const MockOrganization2 : TypesGen . Organization = {
31
+ id : "my-organization-2-id" ,
32
+ name : "my-organization-2" ,
33
+ display_name : "My Organization 2" ,
34
+ description : "Another organization that gets used for stuff." ,
35
+ icon : "/emojis/1f957.png" ,
36
+ created_at : "" ,
37
+ updated_at : "" ,
38
+ is_default : false ,
39
+ } ;
40
+
30
41
export const MockTemplateDAUResponse : TypesGen . DAUsResponse = {
31
42
tz_hour_offset : 0 ,
32
43
entries : [
@@ -265,18 +276,54 @@ export const MockTemplateAdminRole: TypesGen.Role = {
265
276
organization_id : "" ,
266
277
} ;
267
278
279
+ export const MockAuditorRole : TypesGen . Role = {
280
+ name : "auditor" ,
281
+ display_name : "Auditor" ,
282
+ site_permissions : [ ] ,
283
+ organization_permissions : [ ] ,
284
+ user_permissions : [ ] ,
285
+ organization_id : "" ,
286
+ } ;
287
+
268
288
export const MockMemberRole : TypesGen . SlimRole = {
269
289
name : "member" ,
270
290
display_name : "Member" ,
271
291
} ;
272
292
273
- export const MockAuditorRole : TypesGen . Role = {
274
- name : "auditor " ,
275
- display_name : "Auditor " ,
293
+ export const MockOrganizationAdminRole : TypesGen . Role = {
294
+ name : "organization-admin " ,
295
+ display_name : "Organization Admin " ,
276
296
site_permissions : [ ] ,
277
297
organization_permissions : [ ] ,
278
298
user_permissions : [ ] ,
279
- organization_id : "" ,
299
+ organization_id : MockOrganization . id ,
300
+ } ;
301
+
302
+ export const MockOrganizationUserAdminRole : TypesGen . Role = {
303
+ name : "organization-user-admin" ,
304
+ display_name : "Organization User Admin" ,
305
+ site_permissions : [ ] ,
306
+ organization_permissions : [ ] ,
307
+ user_permissions : [ ] ,
308
+ organization_id : MockOrganization . id ,
309
+ } ;
310
+
311
+ export const MockOrganizationTemplateAdminRole : TypesGen . Role = {
312
+ name : "organization-template-admin" ,
313
+ display_name : "Organization Template Admin" ,
314
+ site_permissions : [ ] ,
315
+ organization_permissions : [ ] ,
316
+ user_permissions : [ ] ,
317
+ organization_id : MockOrganization . id ,
318
+ } ;
319
+
320
+ export const MockOrganizationAuditorRole : TypesGen . Role = {
321
+ name : "organization-auditor" ,
322
+ display_name : "Organization Auditor" ,
323
+ site_permissions : [ ] ,
324
+ organization_permissions : [ ] ,
325
+ user_permissions : [ ] ,
326
+ organization_id : MockOrganization . id ,
280
327
} ;
281
328
282
329
// assignableRole takes a role and a boolean. The boolean implies if the
@@ -319,19 +366,8 @@ export const MockUser: TypesGen.User = {
319
366
} ;
320
367
321
368
export const MockUserAdmin : TypesGen . User = {
322
- id : "test-user" ,
323
- username : "TestUser" ,
324
- email : "test@coder.com" ,
325
- created_at : "" ,
326
- updated_at : "" ,
327
- status : "active" ,
328
- organization_ids : [ MockOrganization . id ] ,
369
+ ...MockUser ,
329
370
roles : [ MockUserAdminRole ] ,
330
- avatar_url : "" ,
331
- last_seen_at : "" ,
332
- login_type : "password" ,
333
- theme_preference : "" ,
334
- name : "" ,
335
371
} ;
336
372
337
373
export const MockUser2 : TypesGen . User = {
@@ -366,6 +402,33 @@ export const SuspendedMockUser: TypesGen.User = {
366
402
name : "" ,
367
403
} ;
368
404
405
+ export const MockOrganizationMember : TypesGen . OrganizationMemberWithUserData = {
406
+ organization_id : MockOrganization . id ,
407
+ user_id : MockUser . id ,
408
+ username : MockUser . username ,
409
+ email : MockUser . email ,
410
+ created_at : "" ,
411
+ updated_at : "" ,
412
+ name : MockUser . name ,
413
+ avatar_url : MockUser . avatar_url ,
414
+ global_roles : MockUser . roles ,
415
+ roles : [ ] ,
416
+ } ;
417
+
418
+ export const MockOrganizationMember2 : TypesGen . OrganizationMemberWithUserData =
419
+ {
420
+ organization_id : MockOrganization . id ,
421
+ user_id : MockUser2 . id ,
422
+ username : MockUser2 . username ,
423
+ email : MockUser2 . email ,
424
+ created_at : "" ,
425
+ updated_at : "" ,
426
+ name : MockUser2 . name ,
427
+ avatar_url : MockUser2 . avatar_url ,
428
+ global_roles : MockUser2 . roles ,
429
+ roles : [ ] ,
430
+ } ;
431
+
369
432
export const MockProvisioner : TypesGen . ProvisionerDaemon = {
370
433
created_at : "2022-05-17T17:39:01.382927298Z" ,
371
434
id : "test-provisioner" ,
@@ -2146,7 +2209,7 @@ export const MockEntitlementsWithUserLimit: TypesGen.Entitlements = {
2146
2209
} ) ,
2147
2210
} ;
2148
2211
2149
- export const MockExperiments : TypesGen . Experiment [ ] = [ ] ;
2212
+ export const MockExperiments : TypesGen . Experiment [ ] = [ "multi-organization" ] ;
2150
2213
2151
2214
export const MockAuditLog : TypesGen . AuditLog = {
2152
2215
id : "fbd2116a-8961-4954-87ae-e4575bd29ce0" ,
0 commit comments