mirror of https://github.com/fantasticit/think.git
close #1 使用模板新建文档错误
This commit is contained in:
parent
b5339569c7
commit
b164e750fd
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue