RoleController: Include domain of a domain-aware backend..
..when suggesting user names of it
This commit is contained in:
parent
d663fe84c3
commit
e050ea53ee
|
@ -8,6 +8,7 @@ use GuzzleHttp\Psr7\ServerRequest;
|
||||||
use Icinga\Authentication\AdmissionLoader;
|
use Icinga\Authentication\AdmissionLoader;
|
||||||
use Icinga\Authentication\Auth;
|
use Icinga\Authentication\Auth;
|
||||||
use Icinga\Authentication\RolesConfig;
|
use Icinga\Authentication\RolesConfig;
|
||||||
|
use Icinga\Authentication\User\DomainAwareInterface;
|
||||||
use Icinga\Data\Selectable;
|
use Icinga\Data\Selectable;
|
||||||
use Icinga\Exception\NotFoundError;
|
use Icinga\Exception\NotFoundError;
|
||||||
use Icinga\Forms\Security\RoleForm;
|
use Icinga\Forms\Security\RoleForm;
|
||||||
|
@ -274,9 +275,14 @@ class RoleController extends AuthBackendController
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$domain = '';
|
||||||
|
if ($backend instanceof DomainAwareInterface) {
|
||||||
|
$domain = '@' . $backend->getDomain();
|
||||||
|
}
|
||||||
|
|
||||||
$users = [];
|
$users = [];
|
||||||
foreach ($names as $name) {
|
foreach ($names as $name) {
|
||||||
$users[] = [$name, [
|
$users[] = [$name . $domain, [
|
||||||
'type' => 'user',
|
'type' => 'user',
|
||||||
'backend' => $backend->getName()
|
'backend' => $backend->getName()
|
||||||
]];
|
]];
|
||||||
|
|
Loading…
Reference in New Issue