mirror of
https://github.com/docmost/docmost.git
synced 2026-05-13 02:34:05 +08:00
lint
This commit is contained in:
@@ -202,7 +202,10 @@ export class ShareController {
|
||||
@Body() dto: ShareIdDto,
|
||||
@AuthWorkspace() workspace: Workspace,
|
||||
) {
|
||||
const treeData = await this.shareService.getShareTree(dto.shareId, workspace.id);
|
||||
const treeData = await this.shareService.getShareTree(
|
||||
dto.shareId,
|
||||
workspace.id,
|
||||
);
|
||||
|
||||
const sharingAllowed = await this.shareService.isSharingAllowed(
|
||||
workspace.id,
|
||||
|
||||
@@ -264,7 +264,10 @@ export class ShareService {
|
||||
return ancestor;
|
||||
}
|
||||
|
||||
async isSharingAllowed(workspaceId: string, spaceId: string): Promise<boolean> {
|
||||
async isSharingAllowed(
|
||||
workspaceId: string,
|
||||
spaceId: string,
|
||||
): Promise<boolean> {
|
||||
const result = await this.db
|
||||
.selectFrom('workspaces')
|
||||
.innerJoin('spaces', 'spaces.workspaceId', 'workspaces.id')
|
||||
@@ -278,8 +281,10 @@ export class ShareService {
|
||||
|
||||
if (!result) return false;
|
||||
|
||||
const workspaceDisabled = (result.workspaceSettings as any)?.sharing?.disabled === true;
|
||||
const spaceDisabled = (result.spaceSettings as any)?.sharing?.disabled === true;
|
||||
const workspaceDisabled =
|
||||
(result.workspaceSettings as any)?.sharing?.disabled === true;
|
||||
const spaceDisabled =
|
||||
(result.spaceSettings as any)?.sharing?.disabled === true;
|
||||
|
||||
return !workspaceDisabled && !spaceDisabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user