-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
118 changed files
with
4,473 additions
and
281 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
apps/server/src/infra/schulconnex-client/schulconnex-client-config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
apps/server/src/migrations/mikro-orm/Migration20241209165812.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Migration } from '@mikro-orm/migrations-mongodb'; | ||
|
||
export class Migration20241209165812 extends Migration { | ||
async up(): Promise<void> { | ||
// Add ROOM_OWNER role | ||
await this.getCollection('roles').insertOne({ | ||
name: 'roomowner', | ||
permissions: [ | ||
'ROOM_VIEW', | ||
'ROOM_EDIT', | ||
'ROOM_DELETE', | ||
'ROOM_MEMBERS_ADD', | ||
'ROOM_MEMBERS_REMOVE', | ||
'ROOM_CHANGE_OWNER', | ||
], | ||
}); | ||
console.info( | ||
'Added ROOM_OWNER role with ROOM_VIEW, -_EDIT, _DELETE, -_MEMBERS_ADD, -_MEMBERS_REMOVE AND -_CHANGE_OWNER permission' | ||
); | ||
|
||
// Add ROOM_ADMIN role | ||
await this.getCollection('roles').insertOne({ | ||
name: 'roomadmin', | ||
permissions: ['ROOM_VIEW', 'ROOM_EDIT', 'ROOM_MEMBERS_ADD', 'ROOM_MEMBERS_REMOVE'], | ||
}); | ||
console.info( | ||
'Added ROOM_ADMIN role with ROOM_VIEW, ROOM_EDIT, ROOM_MEMBERS_ADD AND ROOM_MEMBERS_REMOVE permissions' | ||
); | ||
} | ||
|
||
async down(): Promise<void> { | ||
// Remove ROOM_OWNER role | ||
await this.getCollection('roles').deleteOne({ name: 'roomowner' }); | ||
console.info('Rollback: Removed ROOM_OWNER role'); | ||
|
||
// Remove ROOM_ADMIN role | ||
await this.getCollection('roles').deleteOne({ name: 'roomadmin' }); | ||
console.info('Rollback: Removed ROOM_ADMIN role'); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
apps/server/src/migrations/mikro-orm/Migration20241210152600.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Migration } from '@mikro-orm/migrations-mongodb'; | ||
|
||
export class Migration20241210152600 extends Migration { | ||
async up(): Promise<void> { | ||
const roomEditorRoleUpdate = await this.getCollection('roles').updateOne( | ||
{ name: 'roomeditor' }, | ||
{ | ||
$set: { | ||
permissions: ['ROOM_VIEW', 'ROOM_EDIT'], | ||
}, | ||
} | ||
); | ||
|
||
if (roomEditorRoleUpdate.modifiedCount > 0) { | ||
console.info('Permission ROOM_DELETE removed from role roomeditor.'); | ||
} | ||
} | ||
|
||
async down(): Promise<void> { | ||
const roomEditorRoleUpdate = await this.getCollection('roles').updateOne( | ||
{ name: 'roomeditor' }, | ||
{ | ||
$set: { | ||
permissions: ['ROOM_VIEW', 'ROOM_EDIT', 'ROOM_DELETE'], | ||
}, | ||
} | ||
); | ||
|
||
if (roomEditorRoleUpdate.modifiedCount > 0) { | ||
console.info( | ||
'Rollback: Permissions ROOM_DELETE added to and ROOM_MEMBERS_ADD and ROOM_MEMBERS_REMOVE removed from role roomeditor.' | ||
); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
apps/server/src/migrations/mikro-orm/Migration20241213145222.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Migration } from '@mikro-orm/migrations-mongodb'; | ||
|
||
export class Migration20241213145222 extends Migration { | ||
public async up(): Promise<void> { | ||
await this.getCollection('files').createIndex({ 'securityCheck.requestToken': 1 }); | ||
} | ||
|
||
public async down(): Promise<void> { | ||
// no need | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
apps/server/src/modules/board/controller/dto/element/video-conference-element.response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { ContentElementType } from '../../../domain'; | ||
import { TimestampsResponse } from '../timestamps.response'; | ||
|
||
export class VideoConferenceElementContent { | ||
constructor({ title }: VideoConferenceElementContent) { | ||
this.title = title; | ||
} | ||
|
||
@ApiProperty() | ||
title: string; | ||
} | ||
|
||
export class VideoConferenceElementResponse { | ||
constructor({ id, content, timestamps, type }: VideoConferenceElementResponse) { | ||
this.id = id; | ||
this.timestamps = timestamps; | ||
this.type = type; | ||
this.content = content; | ||
} | ||
|
||
@ApiProperty({ pattern: '[a-f0-9]{24}' }) | ||
id: string; | ||
|
||
@ApiProperty({ enum: ContentElementType, enumName: 'ContentElementType' }) | ||
type: ContentElementType.VIDEO_CONFERENCE; | ||
|
||
@ApiProperty() | ||
timestamps: TimestampsResponse; | ||
|
||
@ApiProperty() | ||
content: VideoConferenceElementContent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.