-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock down bucket management to proper permissions #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logically makes sense. We should make a general consistency pass on action naming conventions though to avoid naming things as get* when they aren't computed types.
@@ -53,6 +53,7 @@ onMounted(async () => { | |||
</div> | |||
<div> | |||
<Button | |||
v-if="usePermissionStore().isUserElevatedRights()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be declaring and destructuring this in advance on setup function instead? It might end up helping this specific .js bundle be smaller in size if we only imported that one function instead of the entire permission store's methods.
<script setup lang="ts">
import { useAuthStore, useBucketStore, usePermissionStore } from '@/store';
const { isUserElevatedRights } = usePermissionStore();
</script>
<Button v-if="isUserElevatedRights()" >
Granted, this does contrast with our previous conversations about store readability (which store am I invoking from?)
Description
Ensures user has proper rights and permissions to action certain bucket management functionality.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist
Further comments