fix(ui): standardize permission denial callouts

This commit is contained in:
Andras Bacsai committed 2026-06-04 11:37:16 +02:00
1 parent 5973bb4d4f
commit 8a2373e49f
9 files changed
+98 -26

No files matched your search

@@ -18,7 +18,7 @@
</form>
</div>
@else
<x-callout type="warning" title="Permission Required">
<x-callout type="danger" title="Insufficient Permissions">
You don't have permission to create new destinations. Please contact your team administrator for access.
</x-callout>
@endcan
@@ -101,16 +101,10 @@
</div>
</div>
</div>
@else
<x-callout type="warning" title="Access Restricted">
You don't have permission to clone resources. Contact your team administrator to request access.
</x-callout>
@endcan
<h3 class="pt-4">Move Resource</h3>
<div class="pb-4">Transfer this resource between projects and environments.</div>
<h3 class="pt-4">Move Resource</h3>
<div class="pb-4">Transfer this resource between projects and environments.</div>
@can('update', $resource)
@if ($projects->count() > 0)
<div class="space-y-4">
<div class="flex flex-col lg:flex-row gap-4">
@@ -160,9 +154,8 @@
</div>
@endif
@else
<x-callout type="warning" title="Access Restricted">
You don't have permission to move resources between projects or environments. Contact your team
administrator to request access.
<x-callout type="danger" title="Insufficient Permissions">
You don't have permission to modify this resource. Contact your team administrator for access.
</x-callout>
@endcan
</div>
@@ -10,8 +10,8 @@
<x-forms.button type="submit">Add</x-forms.button>
</form>
@else
<x-callout type="warning" title="Access Restricted" class="mt-4">
You don't have permission to manage tags. Contact your team administrator to request access.
<x-callout type="danger" title="Insufficient Permissions" class="mt-4">
You don't have permission to manage this resource. Contact your team administrator for access.
</x-callout>
@endcan
@if (data_get($this->resource, 'tags') && count(data_get($this->resource, 'tags')) > 0)
@@ -71,6 +71,11 @@
</x-callout>
@endif
@if (!$isCloudflareTunnelsEnabled && $server->isFunctional())
@cannot('update', $server)
<x-callout type="danger" title="Insufficient Permissions" class="mb-4">
You don't have permission to configure Cloudflare Tunnel for this server.
</x-callout>
@endcannot
<div class="flex flex-col pb-2">
<h3>Automated </h3>
<a href="https://coolify.io/docs/knowledge-base/cloudflare/tunnels/server-ssh" target="_blank"
@@ -91,10 +96,6 @@
helper="The SSH domain you configured in Cloudflare. Make sure there is no protocol like http(s):// so you provide a FQDN not a URL. <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/cloudflare/tunnels/server-ssh' target='_blank'>Documentation</a>" />
<x-forms.button type="submit" isHighlighted>Continue</x-forms.button>
</form>
@else
<x-callout type="warning" title="Permission Required" class="mb-4">
You don't have permission to configure Cloudflare Tunnel for this server.
</x-callout>
@endcan
</div>
@script
@@ -121,10 +122,6 @@
]" confirmationText="I manually configured Cloudflare Tunnel"
confirmationLabel="Please type the confirmation text to confirm that you manually configured Cloudflare Tunnel."
shortConfirmationLabel="Confirmation text" />
@else
<x-callout type="warning" title="Permission Required" class="mb-4">
You don't have permission to configure Cloudflare Tunnel for this server.
</x-callout>
@endcan
</div>
@endif
@@ -174,7 +174,7 @@
</x-forms.button> --}}
</div>
@else
<x-callout type="warning" title="Permission Required" class="mb-4">
<x-callout type="danger" title="Insufficient Permissions" class="mb-4">
You don't have permission to configure proxy settings for this server.
</x-callout>
@endcan
@@ -63,7 +63,7 @@
</x-forms.button>
</form>
@else
<x-callout type="warning" title="Permission Required">
<x-callout type="danger" title="Insufficient Permissions">
You don't have permission to create new GitHub Apps. Please contact your team administrator for access.
</x-callout>
@endcan
@@ -24,7 +24,7 @@
</form>
</div>
@else
<x-callout type="warning" title="Permission Required">
<x-callout type="danger" title="Insufficient Permissions">
You don't have permission to create new S3 storage configurations. Please contact your team administrator for
access.
</x-callout>
@@ -54,7 +54,7 @@
<div class="flex gap-2">
<h1>Subscription</h1>
</div>
<x-callout type="warning" title="Permission Required">
<x-callout type="danger" title="Insufficient Permissions">
You are not an admin so you cannot manage your Team's subscription. If this does not make sense, please
<span class="underline cursor-pointer dark:text-white" wire:click="help">contact us</span>.
</x-callout>