feat(acl): Change views/backend code to able to use proper ACL's later on. Currently it is not enabled.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
<div class="flex gap-2">
|
||||
<h3 class="dark:text-white">File: {{ str_replace('|', '.', $fileName) }}</h3>
|
||||
<div class="flex gap-2">
|
||||
<x-modal-input buttonTitle="Edit" title="Edit Configuration">
|
||||
<livewire:server.proxy.new-dynamic-configuration :server_id="$server_id" :fileName="$fileName" :value="$value"
|
||||
:newFile="$newFile" wire:key="{{ $fileName }}" />
|
||||
</x-modal-input>
|
||||
</div>
|
||||
<x-forms.button isError wire:click="delete('{{ $fileName }}')">Delete</x-forms.button>
|
||||
@can('update', $server)
|
||||
<div class="flex gap-2">
|
||||
<x-modal-input buttonTitle="Edit" title="Edit Configuration">
|
||||
<livewire:server.proxy.new-dynamic-configuration :server_id="$server_id" :fileName="$fileName" :value="$value"
|
||||
:newFile="$newFile" wire:key="{{ $fileName }}" />
|
||||
</x-modal-input>
|
||||
</div>
|
||||
<x-forms.button isError wire:click="delete('{{ $fileName }}')">Delete</x-forms.button>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
<div class="flex gap-2">
|
||||
<h2>Dynamic Configurations</h2>
|
||||
<x-forms.button wire:click="loadDynamicConfigurations">Reload</x-forms.button>
|
||||
<x-modal-input buttonTitle="+ Add" title="New Dynamic Configuration">
|
||||
<livewire:server.proxy.new-dynamic-configuration :server_id="$server->id" />
|
||||
</x-modal-input>
|
||||
@can('update', $server)
|
||||
<x-modal-input buttonTitle="+ Add" title="New Dynamic Configuration">
|
||||
<livewire:server.proxy.new-dynamic-configuration :server_id="$server->id" />
|
||||
</x-modal-input>
|
||||
@endcan
|
||||
</div>
|
||||
<div class='pb-4'>You can add dynamic proxy configurations here.</div>
|
||||
</div>
|
||||
@@ -38,7 +40,7 @@
|
||||
wire:model="contents.{{ $fileName }}" rows="5" />
|
||||
@else
|
||||
<livewire:server.proxy.dynamic-configuration-navbar :server_id="$server->id"
|
||||
:fileName="$fileName" :value="$value ?? ''" :newFile="false"
|
||||
:server="$server" :fileName="$fileName" :value="$value ?? ''" :newFile="false"
|
||||
wire:key="{{ $fileName }}-{{ $loop->index }}" />
|
||||
<x-forms.textarea disabled wire:model="contents.{{ $fileName }}"
|
||||
rows="10" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<form wire:submit.prevent="addDynamicConfiguration" class="flex flex-col w-full gap-4">
|
||||
<x-forms.input id="fileName" label="Filename" required />
|
||||
<x-forms.textarea allowTab useMonacoEditor id="value" label="Configuration" required rows="20" />
|
||||
<x-forms.button type="submit" @click="slideOverOpen=false">Save</x-forms.button>
|
||||
<x-forms.input canGate="update" :canResource="$server" id="fileName" label="Filename" required />
|
||||
<x-forms.textarea canGate="update" :canResource="$server" allowTab useMonacoEditor id="value" label="Configuration"
|
||||
required rows="20" />
|
||||
<x-forms.button canGate="update" :canResource="$server" type="submit" @click="slideOverOpen=false">Save</x-forms.button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user