Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/groupfolders.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Niklas Grieb (home) <jan.grieb@gmail.com>2021-03-29 22:55:49 +0300
committerJan Niklas Grieb (home) <jan.grieb@gmail.com>2021-03-29 23:01:08 +0300
commit7b72986c78a35abdf78600575a140cad8ae18d48 (patch)
tree8391c0907f5a96795c52f170f120935502ae876c /src
parent96c6ec566450c28219aed555521962b04c956c2e (diff)
Sidebar view: refresh ACL entries when fileInfo prop changes #1378
Details: in NC 21, the sidebar is not reloaded completely if a different file is selected. Instead, just the props of an open sidebar view are updated. So far, the ACL list not respond to a changed prop. This is now changed, fixing the issue reported as #1378. Signed-off-by: Jan Niklas Grieb (home) <jan.grieb@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/SharingSidebarView.vue36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/components/SharingSidebarView.vue b/src/components/SharingSidebarView.vue
index 8d894470..cdef4c74 100644
--- a/src/components/SharingSidebarView.vue
+++ b/src/components/SharingSidebarView.vue
@@ -132,23 +132,18 @@
export default {
name: 'SharingSidebarView',
props: ['fileInfo'],
+ watch: {
+ fileInfo: function(/*newVal, oldVal*/) {
+ // reload ACL entries if file changes
+ this.loadAcls();
+ }
+ },
components: {
Avatar, Multiselect, AclStateButton
},
beforeMount () {
- this.loading = true;
- this.model = JSON.parse(JSON.stringify(this.fileInfo));
- client.propFind(this.model).then((data) => {
- if (data.acls) {
- this.list = data.acls;
- }
- this.inheritedAclsById = data.inheritedAclsById;
- this.aclEnabled = data.aclEnabled;
- this.aclCanManage = data.aclCanManage;
- this.groupFolderId = data.groupFolderId;
- this.loading = false;
- this.searchMappings('')
- })
+ // load ACL entries for initial file
+ this.loadAcls();
},
data () {
return {
@@ -186,6 +181,21 @@
}
},
methods: {
+ loadAcls() {
+ this.loading = true;
+ this.model = JSON.parse(JSON.stringify(this.fileInfo));
+ client.propFind(this.model).then((data) => {
+ if (data.acls) {
+ this.list = data.acls;
+ }
+ this.inheritedAclsById = data.inheritedAclsById;
+ this.aclEnabled = data.aclEnabled;
+ this.aclCanManage = data.aclCanManage;
+ this.groupFolderId = data.groupFolderId;
+ this.loading = false;
+ this.searchMappings('')
+ })
+ },
getFullDisplayName (displayName, type) {
if (type === 'group') {
return t('groupfolders', '{displayName} (Group)', { displayName: displayName })