Skip to content

Commit 288193e

Browse files
committed
fix(frontend:files): correct writeable condition
1 parent 5102e9a commit 288193e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/app/applications/files/services/files.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export class FilesService {
296296
this.http.head(file.dataUrl).subscribe({
297297
next: async () => {
298298
// 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
299+
const isWriteable = !file?.lock?.isExclusive && permissions.includes(SPACE_OPERATION.MODIFY)
300300
const mode: FILE_MODE = isWriteable ? FILE_MODE.EDIT : FILE_MODE.VIEW
301301

302302
let hookedShortMime: string

0 commit comments

Comments
 (0)