Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Frontend: Fix not showing permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Apr 30, 2021
1 parent cb5194c commit 5d96070
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
21 changes: 16 additions & 5 deletions frontend/src/components/Collections/PermissionsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export default {
showCreationForm: true
}
},
mounted() {
this.refreshPermissions()
},
methods: {
/**
* Updates permissions of a user that already has access to the collection
Expand Down Expand Up @@ -139,11 +142,10 @@ export default {
this.$backupCollectionBackend().findAuthorizedUsersAndRoles(this.collection).then(function (users) {
that.users = users
})
}
},
watch: {
'collection.id': function () {
if (!this.collection.id) {
},
refreshPermissions() {
if (!this.collection.id || !this.collection) {
return
}
Expand All @@ -156,6 +158,15 @@ export default {
this.refreshAccessList()
}
},
watch: {
'collection.id': function () {
this.refreshPermissions()
},
'collection': function () {
this.refreshPermissions()
}
}
}
</script>
4 changes: 2 additions & 2 deletions frontend/src/pages/BackupCollectionDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-7" v-if="isEditing && collection">
<div class="col-7" v-if="isEditing && collection && collection.id">
<permissions-list :collection="collection"/>
</div>

Expand Down Expand Up @@ -167,7 +167,7 @@ export default {
}
})
}
}
},
},
mounted() {
let collectionId = this.$route.params.pathMatch
Expand Down

0 comments on commit 5d96070

Please sign in to comment.