Jump to content

Prestashop 1.7 - how to check if current user has access to admin page?


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...