Merge remote-tracking branch 'gitea/develop' into feat/html-embed-admin

# Conflicts:
#	apps/server/src/core/workspace/services/workspace.service.ts
This commit is contained in:
claude_code
2026-06-20 20:18:44 +03:00
130 changed files with 9955 additions and 3096 deletions

View File

@@ -35,6 +35,7 @@ import {
AUDIT_SERVICE,
IAuditService,
} from '../../integrations/audit/audit.service';
import { AiSettingsService } from '../../integrations/ai/ai-settings.service';
@UseGuards(JwtAuthGuard)
@Controller('shares')
@@ -46,6 +47,7 @@ export class ShareController {
private readonly pagePermissionRepo: PagePermissionRepo,
private readonly pageAccessService: PageAccessService,
private readonly licenseCheckService: LicenseCheckService,
private readonly aiSettings: AiSettingsService,
@Inject(AUDIT_SERVICE) private readonly auditService: IAuditService,
) {}
@@ -79,8 +81,15 @@ export class ShareController {
throw new NotFoundException('Shared page not found');
}
// Surface whether the anonymous public-share AI assistant is enabled, so the
// client only renders the "Ask AI" widget when the workspace allows it.
const aiAssistant = await this.aiSettings.isPublicShareAssistantEnabled(
workspace.id,
);
return {
...shareData,
aiAssistant,
features: this.licenseCheckService.resolveFeatures(
workspace.licenseKey,
workspace.plan,

View File

@@ -4,9 +4,12 @@ import { ShareService } from './share.service';
import { TokenModule } from '../auth/token.module';
import { ShareSeoController } from './share-seo.controller';
import { TransclusionModule } from '../page/transclusion/transclusion.module';
import { AiModule } from '../../integrations/ai/ai.module';
@Module({
imports: [TokenModule, TransclusionModule],
// AiModule (AiSettingsService) is used by the page-info route to surface
// whether the anonymous public-share assistant is enabled for the workspace.
imports: [TokenModule, TransclusionModule, AiModule],
controllers: [ShareController, ShareSeoController],
providers: [ShareService],
exports: [ShareService],