diff --git a/lemonldap-ng-portal/site/htdocs/static/bootstrap/css/styles.css b/lemonldap-ng-portal/site/htdocs/static/bootstrap/css/styles.css index c555d618a..86701f2e4 100644 --- a/lemonldap-ng-portal/site/htdocs/static/bootstrap/css/styles.css +++ b/lemonldap-ng-portal/site/htdocs/static/bootstrap/css/styles.css @@ -162,4 +162,4 @@ div.oidc_consent_message > ul { .progress-bar-animated { width: 100%; -} \ No newline at end of file +} diff --git a/lemonldap-ng-portal/site/templates/bootstrap/checkuser.tpl b/lemonldap-ng-portal/site/templates/bootstrap/checkuser.tpl index 5bbb5df08..e941b66df 100644 --- a/lemonldap-ng-portal/site/templates/bootstrap/checkuser.tpl +++ b/lemonldap-ng-portal/site/templates/bootstrap/checkuser.tpl @@ -1,146 +1,124 @@
- -
alert">">
-
-
- - - " /> - +
alert">
">
+ +
+ + " /> + +
+
+ +
+ " trplaceholder="user" aria-required="true"/> +
+
+
+ +
+ " trplaceholder="URL / DNS" aria-required="true"/> +
+ +
+ +
+ +
">
">
+
-
-
- + +
+
+
HEADERS
+
+ + :
+
+
+
- " trplaceholder="user" aria-required="true"/> -
-
-
- + +
+ +
+
SSO GROUPS
+
+ +
+
+
+
+
+
+
+
+ +
+
ATTRIBUTES
+ + + + + + + + + + + + + + + +
KeyValue
+
+
+
+ +
+
MACROS
+ + + + + + + + + + + + + + + +
KeyValue
+
+
+
+
- " trplaceholder="URL / DNS" aria-required="true"/> -
- -
-   - -
">">
-
- -
-
- - - HEADERS - - - - - - - - - - - - - -
KeyValue
-
-
-
- -
-
- -
-
- - - SSO GROUPS - - - - - - - - -
-
-
-
- -
-
- - - MACROS - - - - - - - - - - - - - -
KeyValue
-
-
-
- - -
-
- - - ATTRIBUTES - - - - - - - - - - - - - -
KeyValue
-
-
-
-
-
- - -
diff --git a/lemonldap-ng-portal/t/59-Double-cookies-Refresh-and-Logout.t b/lemonldap-ng-portal/t/59-Double-cookies-Refresh-and-Logout.t index e5a1d0379..d7fb05a83 100644 --- a/lemonldap-ng-portal/t/59-Double-cookies-Refresh-and-Logout.t +++ b/lemonldap-ng-portal/t/59-Double-cookies-Refresh-and-Logout.t @@ -114,8 +114,8 @@ ok( ), 'POST checkuser' ); -my %attributes = map /(.+)?<\/td>/g, $res->[2]->[0]; -ok( scalar keys %attributes == 16, 'Found 16 attributes' ) +my %attributes = map /(.+)?<\/td>/g, $res->[2]->[0]; +ok( scalar keys %attributes == 17, 'Found 17 attributes' ) or print STDERR "Missing attributes -> " . scalar keys %attributes; ok( $attributes{'_updateTime'} =~ /^\d{14}$/, 'Timestamp found' ) or print STDERR Dumper( \%attributes ); @@ -182,8 +182,8 @@ ok( ), 'POST checkuser' ); -my %attributes2 = map /(.+)?<\/td>/g, $res->[2]->[0]; -ok( scalar keys %attributes2 == 16, 'Found 16 attributes' ) +my %attributes2 = map /(.+)?<\/td>/g, $res->[2]->[0]; +ok( scalar keys %attributes2 == 17, 'Found 17 attributes' ) or print STDERR "Missing attributes -> " . scalar keys %attributes2; ok( $attributes2{'_updateTime'} =~ /^\d{14}$/, 'Timestamp found' ) or print STDERR Dumper( \%attributes2 ); diff --git a/lemonldap-ng-portal/t/67-CheckUser-with-Global-token.t b/lemonldap-ng-portal/t/67-CheckUser-with-Global-token.t index be4bf0d55..42b9b7450 100644 --- a/lemonldap-ng-portal/t/67-CheckUser-with-Global-token.t +++ b/lemonldap-ng-portal/t/67-CheckUser-with-Global-token.t @@ -110,7 +110,7 @@ ok( $res->[2]->[0] =~ m%%, or explain( $res->[2]->[0], 'trspan="checkUserComputeSession"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -118,23 +118,22 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) ok( $res->[2]->[0] =~ m%%, 'Found trspan="groups_sso"' ) or explain( $res->[2]->[0], 'trspan="groups_sso"' ); -ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) - or explain( $res->[2]->[0], 'trspan="macros"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) + or explain( $res->[2]->[0], 'trspan="macros"' ); +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%rtyler%, 'Found rtyler' ) +ok( $res->[2]->[0] =~ m%: rtyler
%, 'Found rtyler' ) or explain( $res->[2]->[0], 'Header Value: rtyler' ); -ok( $res->[2]->[0] =~ m%su%, 'Found su' ) +ok( $res->[2]->[0] =~ m%
su
%, 'Found su' ) or explain( $res->[2]->[0], 'SSO Groups: su' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) + or explain( $res->[2]->[0], 'Attribute Value uid' ); +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) - or explain( $res->[2]->[0], 'Attribute Value uid' ); count(11); $query =~ s/user=dwho/user=msmith/; @@ -153,7 +152,7 @@ ok( ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="forbidden"' ) or explain( $res->[2]->[0], 'trspan="forbidden"' ); count(2); diff --git a/lemonldap-ng-portal/t/67-CheckUser-with-issuer-SAML-POST.t b/lemonldap-ng-portal/t/67-CheckUser-with-issuer-SAML-POST.t index 35c47578c..23c18f57f 100644 --- a/lemonldap-ng-portal/t/67-CheckUser-with-issuer-SAML-POST.t +++ b/lemonldap-ng-portal/t/67-CheckUser-with-issuer-SAML-POST.t @@ -259,11 +259,9 @@ SKIP: { ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); - ok( $res->[2]->[0] =~ m%uid%, - 'Found attribute uid' ) + ok( $res->[2]->[0] =~ m%uid%, 'Found attribute uid' ) or explain( $res->[2]->[0], 'Attribute uid' ); - ok( $res->[2]->[0] =~ m%french%, - 'Found value french' ) + ok( $res->[2]->[0] =~ m%french%, 'Found value french' ) or explain( $res->[2]->[0], 'Value french' ); count(4); @@ -304,13 +302,11 @@ m%
%, ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); - ok( $res->[2]->[0] =~ m%uid%, - 'Found attribute uid' ) + ok( $res->[2]->[0] =~ m%uid%, 'Found attribute uid' ) or explain( $res->[2]->[0], 'Attribute uid' ); - ok( $res->[2]->[0] =~ m%mail%, - 'Found attribute mail' ) + ok( $res->[2]->[0] =~ m%mail%, 'Found attribute mail' ) or explain( $res->[2]->[0], 'Attribute mail' ); - ok( $res->[2]->[0] =~ m%davros\@badguy.org%, + ok( $res->[2]->[0] =~ m%davros\@badguy.org%, 'Found value davros@badguy.org' ) or explain( $res->[2]->[0], 'Value davros@badguy.org' ); count(5); diff --git a/lemonldap-ng-portal/t/67-CheckUser-with-token.t b/lemonldap-ng-portal/t/67-CheckUser-with-token.t index 6d5788841..92696e7fa 100644 --- a/lemonldap-ng-portal/t/67-CheckUser-with-token.t +++ b/lemonldap-ng-portal/t/67-CheckUser-with-token.t @@ -110,7 +110,7 @@ ok( $res->[2]->[0] =~ m%%, or explain( $res->[2]->[0], 'trspan="checkUserComputeSession"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -118,23 +118,22 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) ok( $res->[2]->[0] =~ m%%, 'Found trspan="groups_sso"' ) or explain( $res->[2]->[0], 'trspan="groups_sso"' ); -ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) - or explain( $res->[2]->[0], 'trspan="macros"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) + or explain( $res->[2]->[0], 'trspan="macros"' ); +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%rtyler%, 'Found rtyler' ) +ok( $res->[2]->[0] =~ m%: rtyler%, 'Found rtyler' ) or explain( $res->[2]->[0], 'Header Value: rtyler' ); -ok( $res->[2]->[0] =~ m%su%, 'Found su' ) +ok( $res->[2]->[0] =~ m%
su
%, 'Found su' ) or explain( $res->[2]->[0], 'SSO Groups: su' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) + or explain( $res->[2]->[0], 'Attribute Value uid' ); +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) - or explain( $res->[2]->[0], 'Attribute Value uid' ); count(11); $query =~ s/user=dwho/user=msmith/; @@ -153,7 +152,7 @@ ok( ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="forbidden"' ) or explain( $res->[2]->[0], 'trspan="forbidden"' ); count(2); diff --git a/lemonldap-ng-portal/t/67-CheckUser.t b/lemonldap-ng-portal/t/67-CheckUser.t index 2a57ce907..94072f1ad 100644 --- a/lemonldap-ng-portal/t/67-CheckUser.t +++ b/lemonldap-ng-portal/t/67-CheckUser.t @@ -24,6 +24,7 @@ my $client = LLNG::Manager::Test->new( { totp2fSelfRegistration => 1, totp2fActivation => 1, totp2fDigits => 6, + #hiddenAttributes => 'test', } } @@ -184,7 +185,7 @@ ok( $id = expectCookie($res); # CheckUser form -> granted -# ------------------------- +# ------------------------ ok( $res = $client->_get( @@ -200,10 +201,9 @@ my ( $host, $url, $query ) = expectForm( $res, undef, '/checkuser', 'user', 'url' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); -ok( $res->[2]->[0] =~ m%_user%, - 'Found attribute _user' ) +ok( $res->[2]->[0] =~ m%_user%, 'Found attribute _user' ) or explain( $res->[2]->[0], 'Attribute _user' ); -ok( $res->[2]->[0] =~ m%dwho%, 'Found value dwho' ) +ok( $res->[2]->[0] =~ m%dwho%, 'Found value dwho' ) or explain( $res->[2]->[0], 'Value dwho' ); ok( $res->[2]->[0] !~ m%_2fDevices%, '_2fDevices NOT Found!' ) or explain( $res->[2]->[0], 'Value _2fDevices' ); @@ -228,15 +228,14 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); count(2); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%dwho%, 'Found dwho' ) +ok( $res->[2]->[0] =~ m%: dwho
%, 'Found dwho' ) or explain( $res->[2]->[0], 'Header Value: dwho' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%dwho%, 'Found dwho' ) +ok( $res->[2]->[0] =~ m%dwho%, 'Found dwho' ) or explain( $res->[2]->[0], 'Macro Value dwho' ); count(3); @@ -279,7 +278,7 @@ ok( expectForm( $res, undef, '/checkuser', 'user', 'url' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="forbidden"' ) or explain( $res->[2]->[0], 'trspan="forbidden"' ); count(2); @@ -312,7 +311,7 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -320,27 +319,26 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) ok( $res->[2]->[0] =~ m%%, 'Found trspan="groups_sso"' ) or explain( $res->[2]->[0], 'trspan="groups_sso"' ); -ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) - or explain( $res->[2]->[0], 'trspan="macros"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) + or explain( $res->[2]->[0], 'trspan="macros"' ); +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%rtyler%, 'Found rtyler' ) +ok( $res->[2]->[0] =~ m%: rtyler
%, 'Found rtyler' ) or explain( $res->[2]->[0], 'Header Value: rtyler' ); -ok( $res->[2]->[0] =~ m%su%, 'Found su' ) +ok( $res->[2]->[0] =~ m%
su
%, 'Found su' ) or explain( $res->[2]->[0], 'SSO Groups: su' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) + or explain( $res->[2]->[0], 'Attribute Value uid' ); +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) - or explain( $res->[2]->[0], 'Attribute Value uid' ); count(11); -my @c = ( $res->[2]->[0] =~ /rtyler/gs ); -ok( @c == 2, ' -> Two entries found' ); +my @c = ( $res->[2]->[0] =~ /rtyler<\/td>/gs ); +ok( @c == 3, ' -> Three entries found' ); count(1); # Request with short VH url & user @@ -372,7 +370,7 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -380,23 +378,22 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) ok( $res->[2]->[0] =~ m%%, 'Found trspan="groups_sso"' ) or explain( $res->[2]->[0], 'trspan="groups_sso"' ); -ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) - or explain( $res->[2]->[0], 'trspan="macros"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) + or explain( $res->[2]->[0], 'trspan="macros"' ); +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%rtyler%, 'Found rtyler' ) +ok( $res->[2]->[0] =~ m%: rtyler
%, 'Found rtyler' ) or explain( $res->[2]->[0], 'Header Value: rtyler' ); -ok( $res->[2]->[0] =~ m%su%, 'Found su' ) +ok( $res->[2]->[0] =~ m%
su
%, 'Found su' ) or explain( $res->[2]->[0], 'SSO Groups: su' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) + or explain( $res->[2]->[0], 'Attribute Value uid' ); +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) - or explain( $res->[2]->[0], 'Attribute Value uid' ); count(11); # Request a forbidden identity diff --git a/lemonldap-ng-portal/t/68-Impersonation-with-TOTP.t b/lemonldap-ng-portal/t/68-Impersonation-with-TOTP.t index b592b49ae..ff8b9adb3 100644 --- a/lemonldap-ng-portal/t/68-Impersonation-with-TOTP.t +++ b/lemonldap-ng-portal/t/68-Impersonation-with-TOTP.t @@ -205,7 +205,7 @@ SKIP: { or explain( $res->[2]->[0], 'trspan="checkUserMerged"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -213,26 +213,24 @@ m%
%, ok( $res->[2]->[0] =~ m%%, 'Found trspan="groups_sso"' ) or explain( $res->[2]->[0], 'trspan="groups_sso"' ); - ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) - or explain( $res->[2]->[0], 'trspan="macros"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); - ok( $res->[2]->[0] =~ m%_userDB%, - 'Found _userDB' ) - or explain( $res->[2]->[0], '_userDB' ); - ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) + ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) + or explain( $res->[2]->[0], 'trspan="macros"' ); + ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) + or explain( $res->[2]->[0], 'Attribute Value: _userDB' ); + ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); - ok( $res->[2]->[0] =~ m%dwho%, 'Found dwho' ) + ok( $res->[2]->[0] =~ m%: dwho
%, 'Found dwho' ) or explain( $res->[2]->[0], 'Header Value: dwho' ); - ok( $res->[2]->[0] =~ m%su%, 'Found su' ) + ok( $res->[2]->[0] =~ m%
su
%, 'Found su' ) or explain( $res->[2]->[0], 'SSO Groups: su' ); - ok( $res->[2]->[0] =~ m%_whatToTrace%, + ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) + or explain( $res->[2]->[0], 'Attribute Value uid' ); + ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); - ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) - or explain( $res->[2]->[0], 'Attribute Value uid' ); count(12); $client->logout($id); diff --git a/lemonldap-ng-portal/t/68-Impersonation-with-doubleCookies.t b/lemonldap-ng-portal/t/68-Impersonation-with-doubleCookies.t index ab83228b0..9ba475040 100644 --- a/lemonldap-ng-portal/t/68-Impersonation-with-doubleCookies.t +++ b/lemonldap-ng-portal/t/68-Impersonation-with-doubleCookies.t @@ -192,10 +192,10 @@ ok( ); count(1); -ok( $res->[2]->[0] =~ m%test_impersonation%, +ok( $res->[2]->[0] =~ m%test_impersonation%, 'Found macro test_impersonation' ) or explain( $res->[2]->[0], 'test_impersonation' ); -ok( $res->[2]->[0] =~ m%msmith/msmith%, +ok( $res->[2]->[0] =~ m%msmith/msmith%, 'Found msmith/msmith' ) or explain( $res->[2]->[0], 'Found msmith/msmith' ); count(2); @@ -279,7 +279,7 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -294,39 +294,37 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); -ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) +ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) or explain( $res->[2]->[0], '_userDB' ); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%dwho%, 'Found dwho' ) +ok( $res->[2]->[0] =~ m%: dwho%, 'Found dwho' ) or explain( $res->[2]->[0], 'Header Value: dwho' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%testPrefix_groups%, +ok( $res->[2]->[0] =~ m%testPrefix_groups%, 'Found testPrefix_groups' ) or explain( $res->[2]->[0], 'testPrefix_groups' ); -ok( $res->[2]->[0] =~ m%su; su_test; test_su%, +ok( $res->[2]->[0] =~ m%su; su_test; test_su%, 'Found "su; su_test; test_su"' ) or explain( $res->[2]->[0], 'su' ); -ok( $res->[2]->[0] =~ m%testPrefix_uid%, +ok( $res->[2]->[0] =~ m%testPrefix_uid%, 'Found testPrefix_uid' ) or explain( $res->[2]->[0], 'testPrefix_groups' ); -ok( $res->[2]->[0] =~ m%rtyler%, 'Found rtyler' ) +ok( $res->[2]->[0] =~ m%rtyler%, 'Found rtyler' ) or explain( $res->[2]->[0], 'su' ); -ok( $res->[2]->[0] =~ m%test_impersonation%, +ok( $res->[2]->[0] =~ m%test_impersonation%, 'Found macro test_impersonation' ) or explain( $res->[2]->[0], 'test_impersonation' ); -ok( $res->[2]->[0] =~ m%rtyler/dwho%, - 'Found rtyler/dwo' ) +ok( $res->[2]->[0] =~ m%rtyler/dwho%, 'Found rtyler/dwo' ) or explain( $res->[2]->[0], 'Found rtyler/dwo' ); count(16); -my %attributes = map /(.+)?<\/td>/g, $res->[2]->[0]; -ok( scalar keys %attributes == 33, 'Found 33 attributes' ) - or print STDERR ( keys %attributes < 33 ) +my %attributes = map /(.+)?<\/td>/g, $res->[2]->[0]; +ok( scalar keys %attributes == 35, 'Found 35 attributes' ) + or print STDERR ( keys %attributes < 35 ) ? "Missing attributes -> " . scalar keys %attributes : "Too much attributes -> " . scalar keys %attributes; ok( $attributes{'_auth'} eq 'Demo', '_auth' ) diff --git a/lemonldap-ng-portal/t/68-Impersonation-with-filtered-merge.t b/lemonldap-ng-portal/t/68-Impersonation-with-filtered-merge.t index 27f184fe9..878f8c0e6 100644 --- a/lemonldap-ng-portal/t/68-Impersonation-with-filtered-merge.t +++ b/lemonldap-ng-portal/t/68-Impersonation-with-filtered-merge.t @@ -105,7 +105,7 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -118,29 +118,25 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); -ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) +ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) or explain( $res->[2]->[0], '_userDB' ); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%dwho%, 'Found dwho' ) +ok( $res->[2]->[0] =~ m%: dwho
%, 'Found dwho' ) or explain( $res->[2]->[0], 'Header Value: dwho' ); -ok( $res->[2]->[0] =~ m%su%, 'Found su' ) +ok( $res->[2]->[0] =~ m%
su
%, 'Found su' ) or explain( $res->[2]->[0], 'SSO Groups: su' ); -ok( $res->[2]->[0] =~ m%su_test%, - 'Found su_test' ) +ok( $res->[2]->[0] =~ m%
su_test
%, 'Found su_test' ) or explain( $res->[2]->[0], 'SSO Groups: su_test' ); -ok( $res->[2]->[0] !~ m%_test_%, - 'NOT found _test_' ) +ok( $res->[2]->[0] !~ m%
_test_
%, 'NOT found _test_' ) or explain( $res->[2]->[0], 'SSO Groups: _test_' ); -ok( $res->[2]->[0] !~ m%test_su%, - 'NOT found test_su' ) +ok( $res->[2]->[0] !~ m%
test_su%, 'NOT found test_su' ) or explain( $res->[2]->[0], 'SSO Groups: test_su' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) + or explain( $res->[2]->[0], 'Attribute Value uid' ); +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) - or explain( $res->[2]->[0], 'Attribute Value uid' ); count(15); $client->logout($id); diff --git a/lemonldap-ng-portal/t/68-Impersonation-with-merge.t b/lemonldap-ng-portal/t/68-Impersonation-with-merge.t index 87d015052..9cb5d413c 100644 --- a/lemonldap-ng-portal/t/68-Impersonation-with-merge.t +++ b/lemonldap-ng-portal/t/68-Impersonation-with-merge.t @@ -106,7 +106,7 @@ ok( $res->[2]->[0] =~ m%%, or explain( $res->[2]->[0], 'trspan="checkUserMerged"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -114,42 +114,37 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) ok( $res->[2]->[0] =~ m%%, 'Found trspan="groups_sso"' ) or explain( $res->[2]->[0], 'trspan="groups_sso"' ); -ok( $res->[2]->[0] =~ m%su%, - 'Found SSO group "su"' ) - or explain( $res->[2]->[0], 'Found SSOO group "su"' ); -ok( $res->[2]->[0] =~ m%su_test%, +ok( $res->[2]->[0] =~ m%
su
%, 'Found SSO group "su"' ) + or explain( $res->[2]->[0], 'Found SSO group "su"' ); +ok( $res->[2]->[0] =~ m%
su_test
%, 'Found SSO group "su_test"' ) or explain( $res->[2]->[0], 'Found SSO group "su_test"' ); -ok( $res->[2]->[0] =~ m%test_su%, +ok( $res->[2]->[0] =~ m%
test_su
%, 'Found SSO group "test_su"' ) or explain( $res->[2]->[0], 'Found SSO group "test_su"' ); -ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) - or explain( $res->[2]->[0], 'trspan="macros"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); -ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) +ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) + or explain( $res->[2]->[0], 'trspan="macros"' ); +ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) or explain( $res->[2]->[0], '_userDB' ); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%dwho%, 'Found dwho' ) +ok( $res->[2]->[0] =~ m%: dwho
%, 'Found dwho' ) or explain( $res->[2]->[0], 'Header Value: dwho' ); -ok( $res->[2]->[0] =~ m%su%, 'Found su' ) +ok( $res->[2]->[0] =~ m%
su
%, 'Found su' ) or explain( $res->[2]->[0], 'SSO Groups: su' ); -ok( $res->[2]->[0] =~ m%su_test%, - 'Found su_test' ) +ok( $res->[2]->[0] =~ m%
su_test
%, 'Found su_test' ) or explain( $res->[2]->[0], 'SSO Groups: su_test' ); -ok( $res->[2]->[0] !~ m%_test_%, - 'NOT found _test_' ) +ok( $res->[2]->[0] !~ m%
_test_
%, 'NOT found _test_' ) or explain( $res->[2]->[0], 'SSO Groups: _test_' ); -ok( $res->[2]->[0] =~ m%test_su%, - 'Found test_su' ) +ok( $res->[2]->[0] =~ m%
test_su
%, 'Found test_su' ) or explain( $res->[2]->[0], 'SSO Groups: test_su' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) +ok( $res->[2]->[0] =~ m%uid%, 'Found uid' ) or explain( $res->[2]->[0], 'Attribute Value uid' ); count(18); diff --git a/lemonldap-ng-portal/t/68-Impersonation.t b/lemonldap-ng-portal/t/68-Impersonation.t index e5d78a671..3c6d10514 100644 --- a/lemonldap-ng-portal/t/68-Impersonation.t +++ b/lemonldap-ng-portal/t/68-Impersonation.t @@ -189,10 +189,10 @@ ok( ); count(1); -ok( $res->[2]->[0] =~ m%test_impersonation%, +ok( $res->[2]->[0] =~ m%test_impersonation%, 'Found macro test_impersonation' ) or explain( $res->[2]->[0], 'test_impersonation' ); -ok( $res->[2]->[0] =~ m%msmith/msmith%, +ok( $res->[2]->[0] =~ m%msmith/msmith%, 'Found msmith/msmith' ) or explain( $res->[2]->[0], 'Found msmith/msmith' ); count(2); @@ -277,7 +277,7 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="checkUser"' ) or explain( $res->[2]->[0], 'trspan="checkUser"' ); ok( $res->[2]->[0] =~ -m%
%, +m%
%, 'Found trspan="allowed"' ) or explain( $res->[2]->[0], 'trspan="allowed"' ); ok( $res->[2]->[0] =~ m%%, 'Found trspan="headers"' ) @@ -292,38 +292,36 @@ ok( $res->[2]->[0] =~ m%%, 'Found trspan="macros"' ) ok( $res->[2]->[0] =~ m%%, 'Found trspan="attributes"' ) or explain( $res->[2]->[0], 'trspan="attributes"' ); -ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) +ok( $res->[2]->[0] =~ m%_userDB%, 'Found _userDB' ) or explain( $res->[2]->[0], '_userDB' ); -ok( $res->[2]->[0] =~ m%Auth-User%, - 'Found Auth-User' ) +ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' ) or explain( $res->[2]->[0], 'Header Key: Auth-User' ); -ok( $res->[2]->[0] =~ m%dwho%, 'Found dwho' ) +ok( $res->[2]->[0] =~ m%: dwho
%, 'Found dwho' ) or explain( $res->[2]->[0], 'Header Value: dwho' ); -ok( $res->[2]->[0] =~ m%_whatToTrace%, +ok( $res->[2]->[0] =~ m%_whatToTrace%, 'Found _whatToTrace' ) or explain( $res->[2]->[0], 'Macro Key _whatToTrace' ); -ok( $res->[2]->[0] =~ m%testPrefix_groups%, +ok( $res->[2]->[0] =~ m%testPrefix_groups%, 'Found testPrefix_groups' ) or explain( $res->[2]->[0], 'testPrefix_groups' ); -ok( $res->[2]->[0] =~ m%su; su_test; test_su%, +ok( $res->[2]->[0] =~ m%su; su_test; test_su%, 'Found "su; su_test; test_su"' ) or explain( $res->[2]->[0], 'su' ); -ok( $res->[2]->[0] =~ m%testPrefix_uid%, +ok( $res->[2]->[0] =~ m%testPrefix_uid%, 'Found testPrefix_uid' ) or explain( $res->[2]->[0], 'testPrefix_groups' ); -ok( $res->[2]->[0] =~ m%rtyler%, 'Found rtyler' ) +ok( $res->[2]->[0] =~ m%rtyler%, 'Found rtyler' ) or explain( $res->[2]->[0], 'su' ); -ok( $res->[2]->[0] =~ m%test_impersonation%, +ok( $res->[2]->[0] =~ m%test_impersonation%, 'Found macro test_impersonation' ) or explain( $res->[2]->[0], 'test_impersonation' ); -ok( $res->[2]->[0] =~ m%rtyler/dwho%, - 'Found rtyler/dwo' ) +ok( $res->[2]->[0] =~ m%rtyler/dwho%, 'Found rtyler/dwo' ) or explain( $res->[2]->[0], 'Found rtyler/dwo' ); count(16); -my %attributes = map /(.+)?<\/td>/g, $res->[2]->[0]; -ok( keys %attributes == 31, 'Found 31 attributes' ) +my %attributes = map /(.+)?<\/td>/g, $res->[2]->[0]; +ok( keys %attributes == 33, 'Found 33 attributes' ) or print STDERR "Missing attributes -> " . scalar %attributes; ok( $attributes{'_auth'} eq 'Demo', '_auth' ) or print STDERR Dumper( \%attributes );