mirror of https://github.com/fantasticit/think.git
fix(server): fix authority check
This commit is contained in:
parent
c12e6b1bb2
commit
1c21079dcd
|
@ -630,7 +630,7 @@ export class DocumentService {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!authority || !authority.editable) {
|
if (!authority || !authority.readable) {
|
||||||
throw new HttpException(
|
throw new HttpException(
|
||||||
'您无权查看该文档下的子文档',
|
'您无权查看该文档下的子文档',
|
||||||
HttpStatus.FORBIDDEN,
|
HttpStatus.FORBIDDEN,
|
||||||
|
@ -686,8 +686,6 @@ export class DocumentService {
|
||||||
}) {
|
}) {
|
||||||
const { wikiId, documentId } = data;
|
const { wikiId, documentId } = data;
|
||||||
|
|
||||||
console.log('share');
|
|
||||||
|
|
||||||
const document = documentId
|
const document = documentId
|
||||||
? await this.documentRepo.findOne(documentId)
|
? await this.documentRepo.findOne(documentId)
|
||||||
: await this.documentRepo.findOne({ wikiId, isWikiHome: true });
|
: await this.documentRepo.findOne({ wikiId, isWikiHome: true });
|
||||||
|
|
Loading…
Reference in New Issue