We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5102e9a commit 288193eCopy full SHA for 288193e
frontend/src/app/applications/files/services/files.service.ts
@@ -296,7 +296,7 @@ export class FilesService {
296
this.http.head(file.dataUrl).subscribe({
297
next: async () => {
298
// This check is only used for the text viewer; other viewers are read-only or enforce permissions on the backend.
299
- const isWriteable = file?.lock?.isExclusive && permissions.indexOf(SPACE_OPERATION.MODIFY) > -1
+ const isWriteable = !file?.lock?.isExclusive && permissions.includes(SPACE_OPERATION.MODIFY)
300
const mode: FILE_MODE = isWriteable ? FILE_MODE.EDIT : FILE_MODE.VIEW
301
302
let hookedShortMime: string
0 commit comments