permissions refactoring
This commit is contained in:
@@ -14,7 +14,7 @@ class StoreProjectRequest extends FormRequest
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user() !== null;
|
||||
return $this->user()?->can('create-project') ?? false;
|
||||
}
|
||||
|
||||
protected function prepareForValidation(): void
|
||||
|
||||
Reference in New Issue
Block a user