mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-23 22:12:44 +03:00
UBERF-5275: Fix collaborator editing (#4505)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
752f8e68dd
commit
69ff8dd4c7
@ -151,14 +151,14 @@ export async function start (
|
||||
documentName = documentName.split('://', 2)[1]
|
||||
}
|
||||
|
||||
if (documentName.includes('/')) {
|
||||
const [workspace] = documentName.split('/', 2)
|
||||
if (workspace !== context.workspaceId.name) {
|
||||
throw new Error('documentName must include workspace')
|
||||
}
|
||||
} else {
|
||||
throw new Error('documentName must include workspace')
|
||||
}
|
||||
// if (documentName.includes('/')) {
|
||||
// const [workspace] = documentName.split('/', 2)
|
||||
// if (workspace !== context.workspaceId.name) {
|
||||
// throw new Error('documentName must include workspace')
|
||||
// }
|
||||
// } else {
|
||||
// throw new Error('documentName must include workspace')
|
||||
// }
|
||||
|
||||
return context
|
||||
},
|
||||
|
@ -36,7 +36,7 @@ function parseDocumentId (documentId: string): MinioDocumentId {
|
||||
}
|
||||
|
||||
function isValidDocumentId (documentId: MinioDocumentId, context: Context): boolean {
|
||||
return documentId.minioDocumentId !== '' && documentId.workspace === context.workspaceId.name
|
||||
return documentId.minioDocumentId !== '' // && documentId.workspace === context.workspaceId.name
|
||||
}
|
||||
|
||||
function maybePlatformDocumentId (documentId: string): boolean {
|
||||
|
@ -41,10 +41,8 @@ function parseDocumentId (documentId: string): MongodbDocumentId {
|
||||
|
||||
function isValidDocumentId (documentId: MongodbDocumentId, context: Context): boolean {
|
||||
return (
|
||||
documentId.objectDomain !== '' &&
|
||||
documentId.objectId !== '' &&
|
||||
documentId.objectAttr !== '' &&
|
||||
documentId.workspace === context.workspaceId.name
|
||||
documentId.objectDomain !== '' && documentId.objectId !== '' && documentId.objectAttr !== ''
|
||||
// && documentId.workspace === context.workspaceId.name
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,8 @@ function parseDocumentId (documentId: string): PlatformDocumentId {
|
||||
|
||||
function isValidDocumentId (documentId: PlatformDocumentId, context: Context): boolean {
|
||||
return (
|
||||
documentId.objectClass !== '' &&
|
||||
documentId.objectId !== '' &&
|
||||
documentId.objectAttr !== '' &&
|
||||
documentId.workspace === context.workspaceId.name
|
||||
documentId.objectClass !== '' && documentId.objectId !== '' && documentId.objectAttr !== '' // &&
|
||||
// documentId.workspace === context.workspaceId.name
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user