File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-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 @@ -220,10 +220,10 @@ public function testGetFormWithoutType() {
220220 2 => 'Provider 2 ' ,
221221 ]);
222222 $ this ->config
223- ->expects ($ this ->once ())
223+ ->expects ($ this ->exactly ( 2 )) // 'type' and 'general-require_provisioned_account'
224224 ->method ('getAppValue ' )
225- ->with ('user_saml ' , ' type ' )
226- ->willReturn ('' );
225+ ->with ('user_saml ' , $ this -> anything (), $ this -> anything () )
226+ ->willReturn ($ this -> returnArgument ( 2 ) );
227227
228228 $ params = $ this ->formDataProvider ();
229229 unset($ params ['general ' ]['idp0_display_name ' ]);
You can’t perform that action at this time.
0 commit comments