-
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.
Browse files
Browse the repository at this point in the history
* Split reference authorisation service from authorisation service * Replace on some places the authorisation methodes * Move rules into authorisation module to fix dependency issues * Fix invalid tests * Fix invalid imports
- Loading branch information
Showing
120 changed files
with
2,162 additions
and
1,470 deletions.
There are no files selected for viewing
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
43 changes: 43 additions & 0 deletions
43
apps/server/src/modules/authorization/authorization-reference.module.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,43 @@ | ||
import { forwardRef, Module } from '@nestjs/common'; | ||
import { | ||
CourseGroupRepo, | ||
CourseRepo, | ||
LessonRepo, | ||
SchoolExternalToolRepo, | ||
LegacySchoolRepo, | ||
SubmissionRepo, | ||
TaskRepo, | ||
TeamsRepo, | ||
UserRepo, | ||
} from '@shared/repo'; | ||
import { ToolModule } from '@src/modules/tool'; | ||
import { LoggerModule } from '@src/core/logger'; | ||
import { BoardModule } from '@src/modules/board'; | ||
import { ReferenceLoader, AuthorizationReferenceService, AuthorizationHelper } from './domain'; | ||
import { AuthorizationModule } from './authorization.module'; | ||
|
||
/** | ||
* This module is part of an intermediate state. In the future it should be replaced by an AuthorizationApiModule. | ||
* For now it is used where the authorization itself needs to load data from the database. | ||
* Avoid using this module and load the needed data in your use cases and then use the normal AuthorizationModule! | ||
*/ | ||
@Module({ | ||
// TODO: remove forwardRef to TooModule N21-1055 | ||
imports: [AuthorizationModule, forwardRef(() => ToolModule), forwardRef(() => BoardModule), LoggerModule], | ||
providers: [ | ||
AuthorizationHelper, | ||
ReferenceLoader, | ||
UserRepo, | ||
CourseRepo, | ||
CourseGroupRepo, | ||
TaskRepo, | ||
LegacySchoolRepo, | ||
LessonRepo, | ||
TeamsRepo, | ||
SubmissionRepo, | ||
SchoolExternalToolRepo, | ||
AuthorizationReferenceService, | ||
], | ||
exports: [AuthorizationReferenceService], | ||
}) | ||
export class AuthorizationReferenceModule {} |
69 changes: 31 additions & 38 deletions
69
apps/server/src/modules/authorization/authorization.module.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
100 changes: 0 additions & 100 deletions
100
apps/server/src/modules/authorization/authorization.service.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.