diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index ef6c00a54aad..e55dbe0709bb 100755 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -113,6 +113,12 @@ public function postIndex(ImageUploadRequest $request) */ public function api() { + + // Make sure the self.api permission has been granted + if (!Gate::allows('self.api')) { + abort(403); + } + return view('account/api'); }