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