From d075ebadd9d33dbb173c523828f268b8bef6c973 Mon Sep 17 00:00:00 2001 From: dzikoysk Date: Sat, 23 Jul 2022 01:56:20 +0200 Subject: [PATCH] GH-1473 Validate permissions in upload & trash components (Fix #1473) --- .../src/components/browser/FileBrowserView.vue | 4 ++-- .../src/components/browser/ListEntry.vue | 8 ++++++-- reposilite-frontend/src/store/session.js | 17 +++++++++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/reposilite-frontend/src/components/browser/FileBrowserView.vue b/reposilite-frontend/src/components/browser/FileBrowserView.vue index efd09b5b1..578e45f43 100644 --- a/reposilite-frontend/src/components/browser/FileBrowserView.vue +++ b/reposilite-frontend/src/components/browser/FileBrowserView.vue @@ -35,7 +35,7 @@ const props = defineProps({ const parentPath = ref('') const files = ref({}) -const { client, isManager } = useSession() +const { client, hasPermissionTo } = useSession() const { applyAdjustments } = useAdjustments() const processedFiles = computed(() => ({ @@ -104,7 +104,7 @@ watch( :files="processedFiles" /> diff --git a/reposilite-frontend/src/components/browser/ListEntry.vue b/reposilite-frontend/src/components/browser/ListEntry.vue index 9202ed0eb..edfe188c5 100644 --- a/reposilite-frontend/src/components/browser/ListEntry.vue +++ b/reposilite-frontend/src/components/browser/ListEntry.vue @@ -16,6 +16,7 @@