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