UBERF-8573 Hide archived teamspaces and drives (#7112)

This commit is contained in:
Alexander Onnikov
2024-11-06 21:01:29 +07:00
committed by GitHub
parent d435a0db5a
commit 5b3f69a85f
17 changed files with 130 additions and 18 deletions
+6 -1
View File
@@ -159,6 +159,10 @@ export async function canUnlockDocument (doc: Document | Document[]): Promise<bo
return arr.some((p) => p.lockedBy != null)
}
export function hideArchivedTeamspaces (value: boolean, query: DocumentQuery<Teamspace>): DocumentQuery<Teamspace> {
return value ? { ...query, archived: false } : query
}
export default async (): Promise<Resources> => ({
component: {
CreateDocument,
@@ -196,7 +200,8 @@ export default async (): Promise<Resources> => ({
CanLockDocument: canLockDocument,
CanUnlockDocument: canUnlockDocument,
GetDocumentLinkId: getDocumentLinkId,
ParseDocumentId: parseDocumentId
ParseDocumentId: parseDocumentId,
HideArchivedTeamspaces: hideArchivedTeamspaces
},
resolver: {
Location: resolveLocation