From 4dcb996a51c95d6a5dca8c8a6faaa213ea05ebfc Mon Sep 17 00:00:00 2001 From: christianbeeznst Date: Wed, 22 May 2024 14:59:10 -0500 Subject: [PATCH] Social: Fix shared profile accessible - refs BT#21101 --- assets/vue/composables/useSocialInfo.js | 7 ++++++- assets/vue/views/social/SocialWall.vue | 5 +++-- .../Authorization/Voter/UserVoter.php | 20 ++++++++++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/assets/vue/composables/useSocialInfo.js b/assets/vue/composables/useSocialInfo.js index e6c08182b2..a37424d81e 100644 --- a/assets/vue/composables/useSocialInfo.js +++ b/assets/vue/composables/useSocialInfo.js @@ -43,7 +43,12 @@ export function useSocialInfo() { const loadUser = async () => { try { if (route.query.id) { - user.value = await store.dispatch("user/load", "/api/users/" + route.query.id) + const params = { ...route.query } + if (route.path.includes("/social")) { + params.page_origin = "social" + } + const response = await axios.get(`/api/users/${route.query.id}`, { params }) + user.value = response.data isCurrentUser.value = false } else { user.value = securityStore.user diff --git a/assets/vue/views/social/SocialWall.vue b/assets/vue/views/social/SocialWall.vue index 899f52ed89..b5fdfa5de0 100644 --- a/assets/vue/views/social/SocialWall.vue +++ b/assets/vue/views/social/SocialWall.vue @@ -1,12 +1,12 @@