mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Added gate to check that the user is allowed to view API keys
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
eb8f23a888
commit
512dbfee7a
|
@ -113,6 +113,12 @@ class ProfileController extends Controller
|
|||
*/
|
||||
public function api()
|
||||
{
|
||||
|
||||
// Make sure the self.api permission has been granted
|
||||
if (!Gate::allows('self.api')) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
return view('account/api');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue