mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Added gates to controller
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
73a038afd4
commit
1c14c2fdef
|
@ -28,8 +28,8 @@ class ProfileController extends Controller
|
|||
*/
|
||||
public function getIndex()
|
||||
{
|
||||
$this->authorize('self.profile');
|
||||
$user = Auth::user();
|
||||
|
||||
return view('account/profile', compact('user'));
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ class ProfileController extends Controller
|
|||
*/
|
||||
public function postIndex(ImageUploadRequest $request)
|
||||
{
|
||||
$this->authorize('self.profile');
|
||||
$user = Auth::user();
|
||||
$user->first_name = $request->input('first_name');
|
||||
$user->last_name = $request->input('last_name');
|
||||
|
|
Loading…
Reference in a new issue