Files
coolify/resources/views/livewire/notifications/pushover.blade.php
T
Aditya Tripathi f39fa67cf0 fix(notifications): add canGate/canResource authorization to channel buttons
Per the repo's form-authorization guideline (flagged in review), the enable/
disable and send-test buttons now pass canGate/canResource so they gate on the
policy server-side, not just the browser :disabled. The 5 channel pages pass
their $settings resource; the toggle/test Livewire methods already authorize.
2026-09-14 10:11:17 +00:00

36 lines
1.7 KiB
PHP

<div>
<x-slot:title>
Pushover Notifications | Coolify
</x-slot>
<x-notification.settings-layout>
<div class="application-settings-form flex flex-col gap-6">
<form wire:submit="submit">
<x-unsaved-bar action="submit" />
<x-application.settings-section title="Pushover"
description="Deliver team alerts through your Pushover application.">
<x-slot:actions>
<x-notification.channel-actions :enabled="$pushoverEnabled" enabledProperty="pushoverEnabled"
toggleMethod="instantSavePushoverEnabled" :canUpdate="auth()->user()->can('update', $settings)"
:canResource="$settings" />
</x-slot:actions>
<div class="grid gap-4 lg:grid-cols-2">
@can('update', $settings)
<x-forms.input type="password" required id="pushoverUserKey" label="User key"
helper="Find this in the Pushover dashboard." />
<x-forms.input type="password" required id="pushoverApiToken" label="API token"
helper="Create an application in Pushover to generate this token." />
@else
<x-forms.input disabled label="User key" value="Hidden (only admins can view)" />
<x-forms.input disabled label="API token" value="Hidden (only admins can view)" />
@endcan
</div>
</x-application.settings-section>
</form>
<x-notification.event-grid :settings="$settings" channel="pushover" />
</div>
</x-notification.settings-layout>
</div>