feat(auth): enhance authorization checks in Livewire components for resource management
This commit is contained in:
@@ -50,7 +50,16 @@
|
||||
<x-forms.input
|
||||
helper="You can add a custom name for your container.<br><br>The name will be converted to slug format when you save it. <span class='font-bold dark:text-warning'>You will lose the rolling update feature!</span>"
|
||||
instantSave id="customInternalName" label="Custom Container Name" />
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button type="submit" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
</form>
|
||||
@endif
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
@@ -78,7 +87,16 @@
|
||||
<div class="flex gap-2 items-end pt-4">
|
||||
<h3>GPU</h3>
|
||||
@if ($isGpuEnabled)
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button type="submit" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button type="submit" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
|
||||
{{-- <x-forms.button wire:click="downloadConfig">
|
||||
@@ -82,8 +87,14 @@
|
||||
placeholder="Empty means default configuration will be used." label="Custom Nginx Configuration"
|
||||
helper="You can add custom Nginx configuration here." />
|
||||
@can('update', $application)
|
||||
<x-forms.button wire:click="generateNginxConfiguration">Generate Default Nginx
|
||||
Configuration</x-forms.button>
|
||||
<x-forms.button wire:click="generateNginxConfiguration">
|
||||
Generate Default Nginx Configuration
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button wire:click="generateNginxConfiguration" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Generate Default Nginx Configuration
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
@endif
|
||||
<div class="w-96 pb-6">
|
||||
|
||||
@@ -2,9 +2,16 @@
|
||||
<form wire:submit='submit' class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Swarm Configuration</h2>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button type="submit" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 py-4">
|
||||
<div class="flex flex-col items-end gap-2 xl:flex-row">
|
||||
|
||||
Reference in New Issue
Block a user