Skip to content

Commit

Permalink
Merge pull request #18922 from mvdbeek/disable_storage_dashboard_anon
Browse files Browse the repository at this point in the history
[24.1] Disable storage dashboard button for anon users
  • Loading branch information
davelopez authored Oct 2, 2024
2 parents 662aed0 + 0411872 commit c629bdd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ const showPreferredObjectStoreModal = ref(false);
const historyPreferredObjectStoreId = ref(props.history.preferred_object_store_id);
const niceHistorySize = computed(() => prettyBytes(historySize.value));
const canManageStorage = computed(
() => userOwnsHistory(currentUser.value, props.history) && !currentUser.value?.isAnonymous
);
const storageLocationTitle = computed(() => {
if (isOnlyPreference.value) {
Expand Down Expand Up @@ -137,7 +140,7 @@ onMounted(() => {
variant="link"
size="sm"
class="rounded-0 text-decoration-none history-storage-overview-button"
:disabled="!userOwnsHistory(currentUser, props.history)"
:disabled="!canManageStorage"
data-description="storage dashboard button"
@click="onDashboard">
<FontAwesomeIcon :icon="faDatabase" />
Expand Down

0 comments on commit c629bdd

Please sign in to comment.