Commit 8d778425 authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

Add route to get the current permissions with

parent dd1840c8
Pipeline #8947 failed with stages
in 2 minutes and 56 seconds
......@@ -112,8 +112,11 @@ class MeController extends ApiController
return $this->respondWithData($presenter->getViewModel());
}
/**
* @return \Illuminate\Http\JsonResponse
*/
public function permissions(): JsonResponse
{
return $this->respondWithData(['permissions' => $this->authorizer->getPermissions()]);
}
}
......@@ -128,6 +128,6 @@ Route::group(['middleware' => 'auth:api'], static function () {
Route::get('groups', [MeController::class, 'groups']);
Route::get('tokens', [MeController::class, 'tokens']);
Route::patch('/', [MeController::class, 'update']);
Route::get('permission', [MeController::class, 'permissions']);
Route::get('permissions', [MeController::class, 'permissions']);
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment