protected function getDirName($dirName = null)
    {
        /*
         * Only the active theme can be managed without this permission
         */
        if ($dirName && !$this->user->hasAccess('cms.manage_themes')) {
            $dirName = null;
        }

        if ($dirName === null) {
            $dirName = CmsTheme::getActiveThemeCode();
        }

        return $dirName;
    }