Check user role on store project (has to be admin)
This commit is contained in:
parent
ff5984d227
commit
39dfb703f4
2 changed files with 2 additions and 2 deletions
|
|
@ -13,7 +13,8 @@ class StoreProject extends FormRequest
|
|||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return auth()->check();
|
||||
return auth()->check() and
|
||||
auth()->user()->role === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
|
||||
class UpdateProject extends StoreProject
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue