public function formatPrivileges(array $privileges)
    {
        if (count($privileges)) {
            $output     = \MUtil_Html_ListElement::ul();
            $privileges = array_combine($privileges, $privileges);

            $output->class = 'allowed';

            foreach ($this->getUsedPrivileges() as $privilege => $description) {
                if (isset($privileges[$privilege])) {
                    $output->li()->raw($description);
                }
            }
            if (count($output)) {
                return $output;
            }
        }

        return \MUtil_Html::create('em', $this->_('No privileges found.'));
    }