feat: emit team admin role in userinfo claims when applicable
This commit is contained in:
@@ -47,6 +47,26 @@ class CrmAttributesResponseParserTest extends TestCase
|
||||
self::assertContains('ROLE_CUSTOMER_EXPERT', $roles);
|
||||
}
|
||||
|
||||
/**
|
||||
* ROLE_TEAM_ADMIN is not consumed here at all — it is exported through /api/userinfo and is
|
||||
* myep-team's administrative role — so the claim is the only thing standing between the CRM
|
||||
* selection and that application.
|
||||
*/
|
||||
public function testParseAssignsTeamAdminRoleWhenSelected(): void
|
||||
{
|
||||
$roles = $this->parseRoles($this->selectionXml(1484, true));
|
||||
|
||||
self::assertContains('ROLE_TEAM_ADMIN', $roles);
|
||||
self::assertNotContains('ROLE_ADMIN', $roles, 'the "Admin" selection 1292 is a different one');
|
||||
}
|
||||
|
||||
public function testParseAssignsNoTeamAdminRoleWhenNotSelected(): void
|
||||
{
|
||||
$roles = $this->parseRoles($this->selectionXml(1484, false));
|
||||
|
||||
self::assertNotContains('ROLE_TEAM_ADMIN', $roles);
|
||||
}
|
||||
|
||||
public function testParseAssignsNoCustomerExpertRoleWhenNotSelected(): void
|
||||
{
|
||||
$roles = $this->parseRoles($this->selectionXml(1483, false));
|
||||
|
||||
Reference in New Issue
Block a user