forexknight Posted June 5, 2020 Share Posted June 5, 2020 Hello, I have a module with admin controller: class MyCustomController extends FrameworkBundleAdminController { public function someMethod(Request $request) { // How to check if current user has access to admin? } } I would like to know how can I check if current user has access to admin panel, due to security reasons. Normally in symfony I would use $this->isGranted('ROLE_ADMIN'). Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now