File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
tests/integration/features Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,13 @@ Feature: EnvironmentVariable
2727 And The environment variable "REMOTE_USER" is set to "certainly-not-provisioned-user"
2828 When I send a GET request to "http://localhost:8080/index.php/login"
2929 Then I should be redirected to "http://localhost:8080/index.php/apps/user_saml/saml/notProvisioned"
30+
31+ Scenario : Authenticating using environment variable with SSO as a disabled user on backend
32+ Given A local user with uid "provisioned-disabled-user" exists
33+ And A local user with uid "provisioned-disabled-user" is disabled
34+ And The setting "type" is set to "environment-variable"
35+ And The setting "general-require_provisioned_account" is set to "1"
36+ And The setting "general-uid_mapping" is set to "REMOTE_USER"
37+ And The environment variable "REMOTE_USER" is set to "provisioned-disabled-user"
38+ When I send a GET request to "http://localhost:8080/index.php/login"
39+ Then I should be redirected to "http://localhost:8080/index.php/apps/user_saml/saml/error"
Original file line number Diff line number Diff line change @@ -493,6 +493,21 @@ public function aLocalUserWithUidExists($uid) {
493493 );
494494 }
495495
496+ /**
497+ * @Given A local user with uid :uid is disabled
498+ * @param string $uid
499+ */
500+ public function aLocalUserWithUidIsDisabled ($ uid ) {
501+ shell_exec (
502+ sprintf (
503+ 'OC_PASS=password %s %s user:disable %s ' ,
504+ PHP_BINARY ,
505+ __DIR__ . '/../../../../../../occ ' ,
506+ $ uid
507+ )
508+ );
509+ }
510+
496511 /**
497512 * @Then I hack :uid into existence
498513 */
You can’t perform that action at this time.
0 commit comments