authorization tested in request

This commit is contained in:
spencerrlongg 2023-11-01 11:43:53 -05:00
parent d971172cf3
commit 3f834cb88f
2 changed files with 0 additions and 3 deletions

View file

@ -536,8 +536,6 @@ class AssetsController extends Controller
*/
public function store(StoreAssetRequest $request)
{
$this->authorize('create', Asset::class);
$asset = new Asset();
$asset->model()->associate(AssetModel::find((int) $request->get('model_id')));

View file

@ -15,7 +15,6 @@ class StoreAssetRequest extends ImageUploadRequest
*/
public function authorize(): bool
{
// TODO: make sure this works
return Gate::allows('create', new Asset);
}