Skip to content

Commit

Permalink
Merge branch 'main' into N21-841-use-user-login-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
arnegns authored Sep 8, 2023
2 parents 3075440 + 215a46a commit 283e755
Show file tree
Hide file tree
Showing 169 changed files with 3,753 additions and 1,286 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Build and push ${{ github.repository }}
if: ${{ env.IMAGE_EXISTS == 0 }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v4.1.1
with:
context: .
file: ./Dockerfile
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:

- name: Build and push ${{ github.repository }} (file storage)
if: ${{ env.IMAGE_EXISTS == 0 }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v4.1.1
with:
build-args: |
BASE_IMAGE=ghcr.io/${{ github.repository }}:${{ needs.branch_meta.outputs.sha }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push ${{ github.repository }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v4.1.1
with:
context: .
file: ./Dockerfile
Expand All @@ -59,7 +59,7 @@ jobs:
labels: |
org.opencontainers.image.title=schulcloud-file-storage
- name: Build and push ${{ github.repository }} (file-storage)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v4.1.1
with:
build-args: |
BASE_IMAGE=quay.io/schulcloudverbund/schulcloud-server:${{ github.ref_name }}
Expand Down
4 changes: 4 additions & 0 deletions apps/server/doc/summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
{
"title": "Code Style",
"file": "code-style.md"
},
{
"title": "S3ClientModule",
"file": "../src/shared/infra/s3-client/README.md"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/apps/server.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ async function bootstrap() {
// provide NestJS mail service to feathers app
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
feathersExpress.services['nest-mail'] = {
send(data: Mail): void {
async send(data: Mail): Promise<void> {
const mailService = nestApp.get(MailService);
mailService.send(data);
await mailService.send(data);
},
};
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';

export class AccountResponse {
constructor({ id, username, userId, activated }: AccountResponse) {
constructor({ id, username, userId, activated, updatedAt }: AccountResponse) {
this.id = id;
this.username = username;
this.userId = userId;
this.activated = activated;
this.updatedAt = updatedAt;
}

@ApiProperty()
Expand All @@ -19,4 +20,7 @@ export class AccountResponse {

@ApiProperty()
activated?: boolean;

@ApiProperty()
updatedAt?: Date;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('AccountResponseMapper', () => {
expect(ret.userId).toBe(testEntity.userId?.toString());
expect(ret.activated).toBe(testEntity.activated);
expect(ret.username).toBe(testEntity.username);
expect(ret.updatedAt).toBe(testEntity.updatedAt);
});

it('should ignore missing userId', () => {
Expand Down Expand Up @@ -55,6 +56,7 @@ describe('AccountResponseMapper', () => {
expect(ret.userId).toBe(testDto.userId?.toString());
expect(ret.activated).toBe(testDto.activated);
expect(ret.username).toBe(testDto.username);
expect(ret.updatedAt).toBe(testDto.updatedAt);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class AccountResponseMapper {
userId: account.userId?.toString(),
activated: account.activated,
username: account.username,
updatedAt: account.updatedAt,
});
}

Expand All @@ -18,6 +19,7 @@ export class AccountResponseMapper {
userId: account.userId,
activated: account.activated,
username: account.username,
updatedAt: account.updatedAt,
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ import { AuthorizableObject } from '@shared/domain/domain-object'; // fix import
export interface AuthorizationLoaderService {
findById(id: EntityId): Promise<AuthorizableObject | BaseDO>;
}

export interface AuthorizationLoaderServiceGeneric<T extends AuthorizableObject | BaseDO>
extends AuthorizationLoaderService {
findById(id: EntityId): Promise<T>;
}
10 changes: 5 additions & 5 deletions apps/server/src/modules/board/board.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ import {
@Module({
imports: [ConsoleWriterModule, FilesStorageClientModule, LoggerModule],
providers: [
BoardDoAuthorizableService,
BoardDoRepo,
BoardDoService,
BoardNodeRepo,
CardService,
ColumnBoardService,
ColumnService,
ContentElementService,
SubmissionItemService,
RecursiveDeleteVisitor,
ContentElementFactory,
BoardDoAuthorizableService,
CourseRepo, // TODO: import learnroom module instead. This is currently not possible due to dependency cycle with authorisation service
RecursiveDeleteVisitor,
SubmissionItemService,
],
exports: [
BoardDoAuthorizableService,
CardService,
ColumnBoardService,
ColumnService,
CardService,
ContentElementService,
BoardDoAuthorizableService,
SubmissionItemService,
],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ describe('submission create (api)', () => {
expect(result.id).toBeDefined();
expect(result.timestamps.createdAt).toBeDefined();
expect(result.timestamps.lastUpdatedAt).toBeDefined();
expect(result.userId).toBe(studentUser.id);
expect(result.userData.userId).toBe(studentUser.id);
expect(result.userData.firstName).toBe('John');
expect(result.userData.lastName).toBe('Mr Doe');
});

it('should actually create the submission item', async () => {
Expand Down
Loading

0 comments on commit 283e755

Please sign in to comment.