Skip to content

Fix guard reflector

Fabio Maschi requested to merge fix/guard-reflector into main

For Right guards requiring additional services, they need to declare the constructor. When this is the case, we need to initialise new Reflector to the super class.

--- a/src/modules/teams/assert-has-team-rights.guard.ts
+++ b/src/modules/teams/assert-has-team-rights.guard.ts
@@ -19,12 +19,11 @@ export class AssertHasTeamRightsGuard extends AssertStaffPrivilegeGuard {
     // super
     @Inject(StaffPrivilegesService)
     staffPrivilegesService: StaffPrivilegesService,
-    reflector: Reflector,
     @Inject(AuthService)
     @Inject(ConfigService)
     configService: ConfigService
-  ) { super(staffPrivilegesService, reflector, authService, configService) }
+  ) { super(staffPrivilegesService, new Reflector(), authService, configService) }

Merge request reports

Loading