feat: 收口多品牌与模板构建基础

This commit is contained in:
que01 committed 2026-09-25 02:55:46 +08:00
1 parent 0425a1c672
commit 77224ea51f
317 files changed
+11290 -1158

No files matched your search

+8
View File
@@ -25,4 +25,12 @@ export class AdminAccessService {
if (!membership?.isEnabled) throw new ForbiddenException("管理员没有当前品牌权限");
return { subject: identity.subject, brandId: identity.brandId, role: membership.role };
}
async requireRole(request: FastifyRequest, allowedRoles: string[]): Promise<boolean> {
const access = await this.requireBrand(request);
if (!allowedRoles.includes(access.role)) {
throw new ForbiddenException("当前账号没有系统设置权限");
}
return true;
}
}