core-bundle/src/Resources/contao/dca/tl_theme.php
public function checkPermission()
	{
		if ($this->User->isAdmin)
		{
			return;
		}

		// Check the theme import and export permissions (see #5835)
		switch (Contao\Input::get('key'))
		{
			case 'importTheme':
				if (!$this->User->hasAccess('theme_import', 'themes'))
				{
					throw new Contao\CoreBundle\Exception\AccessDeniedException('Not enough permissions to import themes.');
				}
				break;

			case 'exportTheme':
				if (!$this->User->hasAccess('theme_import', 'themes'))
				{
					throw new Contao\CoreBundle\Exception\AccessDeniedException('Not enough permissions to export themes.');
				}
				break;
		}
	}
public function checkPermission()
	{
		if ($this->User->isAdmin)
		{
			return;
		}

		// Check the theme import and export permissions (see #5835)
		switch (Contao\Input::get('key'))
		{
			case 'importTheme':
				if (!$this->User->hasAccess('theme_import', 'themes'))
				{
					throw new Contao\CoreBundle\Exception\AccessDeniedException('Not enough permissions to import themes.');
				}
				break;

			case 'exportTheme':
				if (!$this->User->hasAccess('theme_import', 'themes'))
				{
					throw new Contao\CoreBundle\Exception\AccessDeniedException('Not enough permissions to export themes.');
				}
				break;
		}
	}
Check permissions to edit the table

@throws Contao\CoreBundle\Exception\AccessDeniedException