feat(events): authorize event editing and date changes by assigned event
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
namespace App\Shared\Forms\Controllers\AdminApp;
|
||||
|
||||
use App\Domains\Core\Auth\Services\EventScopeService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Shared\Forms\Resources\EventFormResource;
|
||||
use App\Shared\Forms\Services\EventFormService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class EventFormController extends Controller
|
||||
@@ -15,7 +16,8 @@ class EventFormController extends Controller
|
||||
{
|
||||
return EventFormResource::make(
|
||||
$this->eventFormService->get(
|
||||
$request->user('sanctum')->tenant()->firstOrFail()
|
||||
$request->user('sanctum')->tenant()->firstOrFail(),
|
||||
app(EventScopeService::class)->eventId($request->user())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user