hide actions and pages in the frontend according to permissions

This commit is contained in:
Gregor Vostrak
2024-04-25 04:12:10 +02:00
parent 77cedb160e
commit f22d423fff
21 changed files with 176 additions and 18 deletions

View File

@@ -10,6 +10,7 @@ import type { Organization } from '@/types/models';
import type { Permissions } from '@/types/jetstream';
import { CreditCardIcon } from '@heroicons/vue/20/solid';
import { isBillingActivated } from '@/utils/billing';
import { canUpdateOrganization } from '@/utils/permissions';
const props = defineProps<{
team: Organization;
@@ -63,7 +64,9 @@ const updateTeamName = () => {
<Link href="/billing">
<PrimaryButton
type="button"
v-if="isBillingActivated()">
v-if="
isBillingActivated() && canUpdateOrganization()
">
<CreditCardIcon class="w-5 h-5 me-2" />
Go to Billing
</PrimaryButton>