A lot of things.
This commit is contained in:
@@ -14,8 +14,11 @@ class StoreEntryRequest extends FormRequest
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
// TODO: Change it by role.
|
||||
return true;
|
||||
$entry = $this->route('entry');
|
||||
if( $entry )
|
||||
return $this->user()->can('update', $entry);
|
||||
|
||||
return $this->user()->can('create', '\App\Models\Entry');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user