mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 11:41:06 +03:30
fix policies
This commit is contained in:
@@ -8,7 +8,9 @@ class StoreItemRequest extends FormRequest
|
||||
{
|
||||
public function authorize()
|
||||
{
|
||||
if ($this->method() != 'POST') {
|
||||
if ($this->method() == 'POST') {
|
||||
return true;
|
||||
} else {
|
||||
$Item = $this->route('Item');
|
||||
return auth('api')->check() && $Item && auth('api')->user()->can('update', $Item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user