Skip to content

Commit

Permalink
Fix personpermissions.hasSystemrechtAtOrganisation
Browse files Browse the repository at this point in the history
  • Loading branch information
casparneumann-cap committed Jul 11, 2024
1 parent 8887f21 commit d4ec69d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
);

const personpermissions: DeepMocked<PersonPermissions> = createMock();
personpermissions.hasSystemrechtAtOrganisation.mockResolvedValueOnce(true);
personpermissions.hasSystemrechtAtOrganisation.mockResolvedValue(true);
personpermissionsRepoMock.loadPersonPermissions.mockResolvedValue(personpermissions);

const response: Response = await request(app.getHttpServer() as App)
Expand All @@ -195,7 +195,7 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
}),
);
const permissions: DeepMocked<PersonPermissions> = createMock<PersonPermissions>();
permissions.hasSystemrechtAtOrganisation.mockResolvedValueOnce(true);
permissions.hasSystemrechtAtOrganisation.mockResolvedValue(true);
permissions.canModifyPerson.mockResolvedValueOnce(true);
personpermissionsRepoMock.loadPersonPermissions.mockResolvedValue(permissions);

Expand Down Expand Up @@ -223,7 +223,7 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
);

const personpermissions: DeepMocked<PersonPermissions> = createMock();
personpermissions.hasSystemrechtAtOrganisation.mockResolvedValueOnce(true);
personpermissions.hasSystemrechtAtOrganisation.mockResolvedValue(true);
personpermissionsRepoMock.loadPersonPermissions.mockResolvedValue(personpermissions);

const response: Response = await request(app.getHttpServer() as App)
Expand Down Expand Up @@ -254,7 +254,7 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
);

const personpermissions: DeepMocked<PersonPermissions> = createMock();
personpermissions.hasSystemrechtAtOrganisation.mockResolvedValueOnce(false);
personpermissions.hasSystemrechtAtOrganisation.mockResolvedValue(false);
personpermissionsRepoMock.loadPersonPermissions.mockResolvedValue(personpermissions);

const response: Response = await request(app.getHttpServer() as App)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export class PersonenkontextWorkflowAggregate {
organisationId: string,
): Promise<Option<DomainError>> {
// Check if logged in person has permission
const hasPermissionAtOrga: boolean = await permissions.hasSystemrechtAtOrganisation(organisationId, [
const hasPermissionAtOrga: boolean = await permissions.hasSystemrechteAtOrganisation(organisationId, [
RollenSystemRecht.PERSONEN_VERWALTEN,
]);

Expand Down

0 comments on commit d4ec69d

Please sign in to comment.