diff --git a/src/modules/personenkontext/domain/personenkontext.factory.ts b/src/modules/personenkontext/domain/personenkontext.factory.ts index 31cf10b79..de1cb05a7 100644 --- a/src/modules/personenkontext/domain/personenkontext.factory.ts +++ b/src/modules/personenkontext/domain/personenkontext.factory.ts @@ -4,12 +4,10 @@ import { Personenkontext } from './personenkontext.js'; import { RolleRepo } from '../../rolle/repo/rolle.repo.js'; import { PersonRepository } from '../../person/persistence/person.repository.js'; import { OrganisationRepository } from '../../organisation/persistence/organisation.repository.js'; -import { ClassLogger } from '../../../core/logging/class-logger.js'; @Injectable() export class PersonenkontextFactory { public constructor( - private readonly logger: ClassLogger, private readonly personRepo: PersonRepository, private readonly organisationRepo: OrganisationRepository, private readonly rolleRepo: RolleRepo, @@ -24,7 +22,6 @@ export class PersonenkontextFactory { rolleId: RolleID, ): Personenkontext { return Personenkontext.construct( - this.logger, this.personRepo, this.organisationRepo, this.rolleRepo, @@ -39,7 +36,6 @@ export class PersonenkontextFactory { public createNew(personId: PersonID, organisationId: OrganisationID, rolleId: RolleID): Personenkontext { return Personenkontext.createNew( - this.logger, this.personRepo, this.organisationRepo, this.rolleRepo, diff --git a/src/modules/personenkontext/domain/personenkontext.ts b/src/modules/personenkontext/domain/personenkontext.ts index fbfbd121c..496420864 100644 --- a/src/modules/personenkontext/domain/personenkontext.ts +++ b/src/modules/personenkontext/domain/personenkontext.ts @@ -11,7 +11,6 @@ import { Rolle } from '../../rolle/domain/rolle.js'; import { RolleRepo } from '../../rolle/repo/rolle.repo.js'; import { OrganisationMatchesRollenart } from '../specification/organisation-matches-rollenart.js'; import { OrganisationMatchesRollenartError } from '../specification/error/organisation-matches-rollenart.error.js'; -import { ClassLogger } from '../../../core/logging/class-logger.js'; export type PersonenkontextPartial = Pick< Personenkontext, @@ -40,11 +39,9 @@ export class Personenkontext { public readonly personId: PersonID, public readonly organisationId: OrganisationID, public readonly rolleId: RolleID, - public readonly logger: ClassLogger, ) {} public static construct( - logger: ClassLogger, personRepo: PersonRepository, organisationRepo: OrganisationRepository, rolleRepo: RolleRepo, @@ -65,12 +62,10 @@ export class Personenkontext { personId, organisationId, rolleId, - logger ); } public static createNew( - logger: ClassLogger, personRepo: PersonRepository, organisationRepo: OrganisationRepository, rolleRepo: RolleRepo, @@ -88,7 +83,6 @@ export class Personenkontext { personId, organisationId, rolleId, - logger ); } @@ -129,7 +123,6 @@ export class Personenkontext { public async checkPermissions(permissions: PersonPermissions): Promise> { // Check if logged in person has permission - this.logger.info(`${permissions.personFields.id} START hasSystemrechteAtOrganisation`); { const hasPermissionAtOrga: boolean = await permissions.hasSystemrechteAtOrganisation(this.organisationId, [ RollenSystemRecht.PERSONEN_VERWALTEN, @@ -140,7 +133,6 @@ export class Personenkontext { return new MissingPermissionsError('Unauthorized to manage persons at the organisation'); } } - this.logger.info(`${permissions.personFields.id} END hasSystemrechteAtOrganisation`); // Check if logged in user can modify target person {