diff --git a/apps/server/src/modules/authorization/authorization-reference.module.ts b/apps/server/src/modules/authorization/authorization-reference.module.ts index 1b260a48457..a5d59753c58 100644 --- a/apps/server/src/modules/authorization/authorization-reference.module.ts +++ b/apps/server/src/modules/authorization/authorization-reference.module.ts @@ -1,4 +1,5 @@ import { BoardModule } from '@modules/board'; +import { InstanceModule } from '@modules/instance'; import { LessonModule } from '@modules/lesson'; import { ToolModule } from '@modules/tool'; import { forwardRef, Module } from '@nestjs/common'; @@ -13,7 +14,6 @@ import { UserRepo, } from '@shared/repo'; import { LoggerModule } from '@src/core/logger'; -import { InstanceModule } from '../instance'; import { AuthorizationModule } from './authorization.module'; import { AuthorizationHelper, AuthorizationReferenceService, ReferenceLoader } from './domain'; diff --git a/apps/server/src/modules/authorization/authorization.module.ts b/apps/server/src/modules/authorization/authorization.module.ts index ae5637d385c..dfd6038cd8b 100644 --- a/apps/server/src/modules/authorization/authorization.module.ts +++ b/apps/server/src/modules/authorization/authorization.module.ts @@ -8,6 +8,7 @@ import { ContextExternalToolRule, CourseGroupRule, CourseRule, + ExternalToolRule, GroupRule, InstanceRule, LegacySchoolRule, @@ -22,7 +23,6 @@ import { UserLoginMigrationRule, UserRule, } from './domain/rules'; -import { ExternalToolRule } from './domain/rules/external-tool.rule'; import { FeathersAuthorizationService, FeathersAuthProvider } from './feathers'; @Module({ diff --git a/apps/server/src/modules/authorization/domain/rules/index.ts b/apps/server/src/modules/authorization/domain/rules/index.ts index f03c6c8d741..f18bdbd9e20 100644 --- a/apps/server/src/modules/authorization/domain/rules/index.ts +++ b/apps/server/src/modules/authorization/domain/rules/index.ts @@ -19,3 +19,4 @@ export * from './group.rule'; export { SystemRule } from './system.rule'; export { SchoolSystemOptionsRule } from './school-system-options.rule'; export { InstanceRule } from './instance.rule'; +export { ExternalToolRule } from './external-tool.rule'; diff --git a/apps/server/src/modules/authorization/domain/rules/instance.rule.spec.ts b/apps/server/src/modules/authorization/domain/rules/instance.rule.spec.ts index 9e4e8d79f65..b5dd35bbc4a 100644 --- a/apps/server/src/modules/authorization/domain/rules/instance.rule.spec.ts +++ b/apps/server/src/modules/authorization/domain/rules/instance.rule.spec.ts @@ -1,8 +1,8 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { instanceFactory } from '@modules/instance/testing'; import { Test, TestingModule } from '@nestjs/testing'; import { Permission } from '@shared/domain/interface'; import { setupEntities, userFactory } from '@shared/testing'; -import { instanceFactory } from '../../../instance/testing'; import { AuthorizationHelper } from '../service/authorization.helper'; import { Action, AuthorizationContext } from '../type'; import { InstanceRule } from './instance.rule'; diff --git a/apps/server/src/modules/authorization/domain/service/reference.loader.spec.ts b/apps/server/src/modules/authorization/domain/service/reference.loader.spec.ts index 9eea5408d7a..997afd6ce99 100644 --- a/apps/server/src/modules/authorization/domain/service/reference.loader.spec.ts +++ b/apps/server/src/modules/authorization/domain/service/reference.loader.spec.ts @@ -1,9 +1,9 @@ import { createMock, DeepMocked } from '@golevelup/ts-jest'; import { ObjectId } from '@mikro-orm/mongodb'; import { BoardDoAuthorizableService } from '@modules/board'; +import { InstanceService } from '@modules/instance'; import { LessonService } from '@modules/lesson'; -import { ContextExternalToolAuthorizableService } from '@modules/tool'; -import { ExternalToolAuthorizableService } from '@modules/tool/external-tool/service'; +import { ContextExternalToolAuthorizableService, ExternalToolAuthorizableService } from '@modules/tool'; import { NotImplementedException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { EntityId } from '@shared/domain/types'; @@ -18,7 +18,6 @@ import { UserRepo, } from '@shared/repo'; import { setupEntities, userFactory } from '@shared/testing'; -import { InstanceService } from '../../../instance'; import { AuthorizableReferenceType } from '../type'; import { ReferenceLoader } from './reference.loader'; diff --git a/apps/server/src/modules/tool/index.ts b/apps/server/src/modules/tool/index.ts index 808813349b9..f6ba7329778 100644 --- a/apps/server/src/modules/tool/index.ts +++ b/apps/server/src/modules/tool/index.ts @@ -3,3 +3,4 @@ export * from './context-external-tool/service/context-external-tool-authorizabl export * from './external-tool'; export * from './tool.module'; export { default as ToolConfiguration, IToolFeatures } from './tool-config'; +export { ExternalToolAuthorizableService } from './external-tool/service/external-tool-authorizable.service'; diff --git a/apps/server/src/shared/repo/index.ts b/apps/server/src/shared/repo/index.ts index de8af17b788..5ffe23c4780 100644 --- a/apps/server/src/shared/repo/index.ts +++ b/apps/server/src/shared/repo/index.ts @@ -29,3 +29,4 @@ export * from './userloginmigration'; export * from './videoconference'; export * from './contextexternaltool'; export * from './externaltool'; +export { BaseDomainObjectRepo } from './base-domain-object.repo';