File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -175,13 +175,14 @@ public function getForm() {
175175 }
176176
177177 $ type = $ this ->config ->getAppValue ('user_saml ' , 'type ' );
178+
179+ $ generalSettings ['require_provisioned_account ' ] = [
180+ 'text ' => $ this ->l10n ->t ('Only allow authentication if an account exists on some other backend (e.g. LDAP). ' , [$ this ->defaults ->getName ()]),
181+ 'type ' => 'checkbox ' ,
182+ 'global ' => true ,
183+ 'value ' => $ this ->config ->getAppValue ('user_saml ' , 'general-require_provisioned_account ' , '0 ' )
184+ ];
178185 if ($ type === 'saml ' ) {
179- $ generalSettings ['require_provisioned_account ' ] = [
180- 'text ' => $ this ->l10n ->t ('Only allow authentication if an account exists on some other backend (e.g. LDAP). ' , [$ this ->defaults ->getName ()]),
181- 'type ' => 'checkbox ' ,
182- 'global ' => true ,
183- 'value ' => $ this ->config ->getAppValue ('user_saml ' , 'general-require_provisioned_account ' , '0 ' )
184- ];
185186 $ generalSettings ['idp0_display_name ' ] = [
186187 'text ' => $ this ->l10n ->t ('Optional display name of the identity provider (default: "SSO & SAML log in") ' ),
187188 'type ' => 'line ' ,
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ public function formDataProvider() {
9393 'text ' => 'Only allow authentication if an account exists on some other backend (e.g. LDAP). ' ,
9494 'type ' => 'checkbox ' ,
9595 'global ' => true ,
96+ 'value ' => '0 '
9697 ],
9798 'allow_multiple_user_back_ends ' => [
9899 'text ' => $ this ->l10n ->t ('Allow the use of multiple user back-ends (e.g. LDAP) ' ),
@@ -220,10 +221,10 @@ public function testGetFormWithoutType() {
220221 2 => 'Provider 2 ' ,
221222 ]);
222223 $ this ->config
223- ->expects ($ this ->once ())
224+ ->expects ($ this ->exactly ( 2 )) // 'type' and 'general-require_provisioned_account'
224225 ->method ('getAppValue ' )
225- ->with ('user_saml ' , ' type ' )
226- ->willReturn ('' );
226+ ->with ('user_saml ' , $ this -> anything (), $ this -> anything () )
227+ ->willReturn ($ this -> returnArgument ( 2 ) );
227228
228229 $ params = $ this ->formDataProvider ();
229230 unset($ params ['general ' ]['idp0_display_name ' ]);
You can’t perform that action at this time.
0 commit comments