Skip to content

Vulnerability scanner: Add ability to see all items on a server if one is an administrator#322

Merged
jonkeane merged 1 commit intomainfrom
admin_scanning
Feb 10, 2026
Merged

Vulnerability scanner: Add ability to see all items on a server if one is an administrator#322
jonkeane merged 1 commit intomainfrom
admin_scanning

Conversation

@jonkeane
Copy link
Collaborator

@jonkeane jonkeane commented Feb 6, 2026

Checks if someone is an administrator, and if they are adds a toggle to see all packages.

resolves: #321

@jonkeane jonkeane requested a review from dotNomad February 6, 2026 15:31
Copy link
Collaborator

@dotNomad dotNomad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add an item to the CHANGELOG for this too 🎉

Noted a couple things we could improve, but nothing necessary. Awesome change

Comment on lines +215 to +227
<label v-if="userStore.isAdmin" class="flex items-center gap-2 cursor-pointer">
<span class="text-sm text-gray-600">show:</span>
<span class="text-sm" :class="showAllContent ? 'text-gray-600' : 'text-gray-800 font-medium'">only mine</span>
<div class="relative">
<input
type="checkbox"
v-model="showAllContent"
class="sr-only peer"
/>
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
</div>
<span class="text-sm" :class="showAllContent ? 'text-gray-800 font-medium' : 'text-gray-600'">all</span>
</label>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice, but not necessary to break this into a separate component.

Comment on lines +29 to +31
async function fetchContentList(forceRefresh: boolean = false) {
// Skip if content is already loaded for this mode (unless forcing refresh)
if (!forceRefresh && isContentLoaded.value && contentList.value.length > 0) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this it was a bit jarring to flip back and forth and have the entire UI reload. I wonder if we could store the content separately so once loaded a use can swap back and forth.

Definitely too big for this PR though since that would require a substantial refactor.

@jonkeane jonkeane merged commit 12cb48d into main Feb 10, 2026
21 checks passed
@jonkeane jonkeane deleted the admin_scanning branch February 10, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package Vulnerability Scanner (v2.0.2): Administrators cannot view all content on Posit Connect

2 participants