public function perms()
{
$perms = array('admin' => array('title' => _("Admin")), 'forums' => array('title' => _("Forums")));
foreach ($GLOBALS['registry']->listApps() as $scope) {
$perms['forums:' . $scope] = array('title' => $GLOBALS['registry']->get('name', $scope));
$forums = $GLOBALS['injector']->getInstance('Agora_Factory_Driver')->create($scope);
try {
$forums_list = $forums->getBareForums();
foreach ($forums_list as $id => $title) {
$perms['forums:' . $scope . ':' . $id] = array('title' => $title);
}
} catch (Horde_Db_Exception $e) {
throw new Agora_Exception($e->getMessage());
}
}
return $perms;
}