/**
  * Checks whether the current user is authorized to perform a certain
  * action on an object.
  *
  * @param AccessibleInterface $object The object for which the access is to be checked.
  * @param string $action The action for which the access check is to be performed.
  * @return boolean TRUE, when the user is authorized, otherwise FALSE.
  */
 public function checkAuthorization(AccessibleInterface $object, $action)
 {
     // ACLs can be disabled for debugging. Also, in Backend mode, the ACL
     // mechanism does not work (no fe_users!).
     if (isset($this->settings) && $this->settings['debug']['disableACLs'] || TYPO3_MODE === 'BE' && $this->implicitAdministratorInBackend === TRUE) {
         return TRUE;
     }
     $cacheIdentifier = $this->getCacheIdentifier($object, $action);
     if ($this->cache->has($cacheIdentifier)) {
         $value = $this->cache->get($cacheIdentifier);
     } else {
         $this->cache->set($cacheIdentifier, $value = $object->checkAccess($this->getUser(), $action));
     }
     return $value;
 }
    /**
     * Loads the editor configuration
     *
     * @param string $configurationPath The typoscript setup path in which the
     *                                   editor configuration is stored.
     *
     * @return string
     * @throws \TYPO3\CMS\Extbase\Object\InvalidClassException
     */
    protected function initializeJavascriptSetupFromConfiguration($configurationPath)
    {
        $this->configuration = $this->typoscriptReader->loadTyposcriptFromPath($configurationPath);
        if ($this->cache->has('bbcodeeditor-jsonconfig')) {
            return $this->javascriptSetup = $this->cache->get('bbcodeeditor-jsonconfig');
        }
        foreach ($this->configuration['panels.'] as $key => $panelConfiguration) {
            $panel = $this->objectManager->get($panelConfiguration['className']);
            if (!$panel instanceof \Mittwald\Typo3Forum\TextParser\Panel\PanelInterface) {
                throw new \TYPO3\CMS\Extbase\Object\InvalidClassException('Expected an implementation of the \\Mittwald\\Typo3Forum\\TextParser\\Panel\\PanelInterface interface!', 1315835842);
            }
            $panel->setSettings($panelConfiguration);
            $this->panels[] = $panel;
        }
        $this->javascriptSetup = '
		<script language="javascript">
		' . 'var bbcodeSettings = ' . json_encode($this->getPanelSettings()) . ';' . '$(document).ready(function()	{' . '$(\'#' . $this->arguments['id'] . '\').markItUp(bbcodeSettings);' . '}); </script>';
        $this->cache->set('bbcodeeditor-jsonconfig', $this->javascriptSetup);
        return $this->javascriptSetup;
    }