code: public function checkPermission()
  	{
  		if ($this->User->isAdmin)
  		{
  			return;
  		}
  
  		if (!$this->User->hasAccess('image_sizes', 'themes'))
  		{
  			throw new Contao\CoreBundle\Exception\AccessDeniedException('Not enough permissions to access the image sizes module.');
  		}
  	}
docs: Check permissions to edit the table
  
  @throws Contao\CoreBundle\Exception\AccessDeniedException