parent
5dcc307e87
commit
bf590ed380
|
@ -63,7 +63,16 @@ class RoleForm extends ConfigForm
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$helper = new Zend_Form_Element('bogus');
|
$helper = new Zend_Form_Element('bogus');
|
||||||
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $module) {
|
$mm = Icinga::app()->getModuleManager();
|
||||||
|
foreach ($mm->listInstalledModules() as $moduleName) {
|
||||||
|
$modulePermission = $mm::MODULE_PERMISSION_NS . $moduleName;
|
||||||
|
$this->providedPermissions[$modulePermission] = sprintf(
|
||||||
|
$this->translate('Allow access to module %s') . ' (%s)',
|
||||||
|
$moduleName,
|
||||||
|
$modulePermission
|
||||||
|
);
|
||||||
|
if ($mm->hasEnabled($moduleName)) {
|
||||||
|
$module = $mm->getModule($moduleName);
|
||||||
foreach ($module->getProvidedPermissions() as $permission) {
|
foreach ($module->getProvidedPermissions() as $permission) {
|
||||||
/** @var object $permission */
|
/** @var object $permission */
|
||||||
$this->providedPermissions[$permission->name] = $permission->description . ' (' . $permission->name . ')';
|
$this->providedPermissions[$permission->name] = $permission->description . ' (' . $permission->name . ')';
|
||||||
|
@ -85,6 +94,7 @@ class RoleForm extends ConfigForm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
Loading…
Reference in New Issue