User roles and permission management via Admin UI (#1231)

This commit is contained in:
Kevin Papst
2019-11-10 18:53:56 +01:00
committed by GitHub
parent c6c4098759
commit af0f89774e
58 changed files with 1355 additions and 186 deletions

View File

@@ -15,7 +15,7 @@ use App\Ldap\LdapDriver;
use App\Ldap\LdapDriverException;
use App\Ldap\LdapManager;
use App\Ldap\LdapUserHydrator;
use App\Security\RoleService;
use App\Tests\Mocks\Security\RoleServiceFactory;
use PHPUnit\Framework\TestCase;
/**
@@ -50,11 +50,13 @@ class LdapManagerTest extends TestCase
'role' => $roleConfig,
]);
$hydrator = new LdapUserHydrator($config, new RoleService([
$roles = [
'ROLE_TEAMLEAD' => ['ROLE_USER'],
'ROLE_ADMIN' => ['ROLE_TEAMLEAD'],
'ROLE_SUPER_ADMIN' => ['ROLE_ADMIN']
]));
];
$hydrator = new LdapUserHydrator($config, (new RoleServiceFactory($this))->create($roles));
return new LdapManager($driver, $hydrator, $config);
}