mirror of
https://github.com/fantasticit/think.git
synced 2026-09-24 15:29:58 +08:00
close #1 使用模板新建文档错误
This commit is contained in:
@@ -121,7 +121,7 @@ export class TemplateService {
|
||||
*/
|
||||
async useTemplate(user: OutUser, templateId) {
|
||||
const data = await this.templateRepo.findOne(templateId);
|
||||
if (user.id !== data.createUserId) {
|
||||
if (user.id !== data.createUserId && !data.isPublic) {
|
||||
throw new HttpException(
|
||||
'您不是模板创建者,无法编辑',
|
||||
HttpStatus.FORBIDDEN,
|
||||
|
||||
Reference in New Issue
Block a user