diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-03-16 22:12:49 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-03-25 23:38:26 +0300 |
commit | ba44d7b587af90d7335d341b55c44938e273fb24 (patch) | |
tree | 49fd27747fb0ad86c36d0c826d506b38b99d9d6e /src | |
parent | 4be03dd91927b6cf330017b61c6bddb09a8796b2 (diff) |
Send parent folder permissions along with workspace file metadata
The folder permissions are sent even if there is no workspace file for
the folder. This will make possible to disable the rich workspaces UI if
creating files is not enabled in a folder.
Rich workspaces are disabled for public share pages, so the folder
permissions are not sent in that case.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/views/RichWorkspace.vue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index 7e5ecb6f5..1cbd4c654 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -67,6 +67,7 @@ export default { data() { return { focus: false, + folder: null, file: null, loaded: false, ready: false, @@ -124,10 +125,13 @@ export default { } axios.get(WORKSPACE_URL, { params }).then((response) => { const data = response.data.ocs.data + this.folder = data.folder || null this.file = data.file this.editing = true this.loaded = true - }).catch(() => { + }).catch((error) => { + const data = error.response.data.ocs.data + this.folder = data.folder || null this.file = null this.loaded = true this.ready = true |