fix: ensure authorization checks are in place for viewing and updating the application

This commit is contained in:
Andras Bacsai 2025-10-16 13:04:44 +02:00
parent db3514cd8e
commit 6e8c557ed3

View file

@ -26,7 +26,8 @@ class EditDomain extends Component
public function mount()
{
$this->application = ServiceApplication::find($this->applicationId);
$this->application = ServiceApplication::query()->findOrFail($this->applicationId);
$this->authorize('view', $this->application);
$this->syncData(false);
}
@ -49,6 +50,7 @@ public function confirmDomainUsage()
public function submit()
{
try {
$this->authorize('update', $this->application);
$this->fqdn = str($this->fqdn)->replaceEnd(',', '')->trim()->toString();
$this->fqdn = str($this->fqdn)->replaceStart(',', '')->trim()->toString();
$domains = str($this->fqdn)->trim()->explode(',')->map(function ($domain) {