~fkooman/vpn-user-portal

0bfe597ea2de174fcb9d11983d758b84860c9dbe — François Kooman 3 months ago 1439677
fix user sessionExpiry override

we forgot to consider the attribute name in front of the attribute value
Fixes: https://todo.sr.ht/~eduvpn/server/175
2 files changed, 5 insertions(+), 1 deletions(-)

M src/Http/UserInfo.php
M tests/Http/UserInfoTest.php
M src/Http/UserInfo.php => src/Http/UserInfo.php +4 -0
@@ 138,6 138,10 @@ class UserInfo
    {
        $sessionExpiryList = [];
        foreach ($this->permissionList as $userPermission) {
            $e = explode('!', $userPermission, 2);
            if (2 === count($e)) {
                $userPermission = $e[1];
            }
            if (null !== $sessionExpiry = self::fromRegexp($userPermission)) {
                $sessionExpiryList[] = $sessionExpiry;
            }

M tests/Http/UserInfoTest.php => tests/Http/UserInfoTest.php +1 -1
@@ 68,7 68,7 @@ final class UserInfoTest extends TestCase
            'foo',
            [
                'https://eduvpn.org/expiry#P1Y',
                'https://eduvpn.org/expiry#PT12H',
                'eduPersonEntitlement!https://eduvpn.org/expiry#PT12H',
            ]
        );
        $this->assertSame(