mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Create permissions.ini when defining the initial administrator
refs #7163
This commit is contained in:
parent
3fc07496bc
commit
ec47f6bdb3
@ -67,6 +67,24 @@ class AuthenticationStep extends Step
|
|||||||
|
|
||||||
protected function defineInitialAdmin()
|
protected function defineInitialAdmin()
|
||||||
{
|
{
|
||||||
|
$config = array();
|
||||||
|
$config['admins'] = array(
|
||||||
|
'users' => $this->data['adminAccountData']['username'],
|
||||||
|
'permission' => '*'
|
||||||
|
);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$writer = new PreservingIniWriter(array(
|
||||||
|
'config' => new Zend_Config($config),
|
||||||
|
'filename' => Config::resolvePath('permissions.ini'),
|
||||||
|
'filemode' => octdec($this->data['fileMode'])
|
||||||
|
));
|
||||||
|
$writer->write();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->permIniError = $e;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$this->permIniError = false;
|
$this->permIniError = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user