Removed restoreParameters methods

This commit is contained in:
Prarup Gurung
2023-03-09 14:25:23 +05:45
parent fab9bfc734
commit 65d11ef634
2 changed files with 28 additions and 141 deletions
@@ -639,7 +639,6 @@ trait Provisioning {
if (!$this->skipImportLdif) {
$this->importLdifFile($ldifFile);
}
$this->theLdapUsersHaveBeenResynced();
}
/**
@@ -747,7 +746,6 @@ trait Provisioning {
$this->ldap->add($newDN, $entry);
}
$this->ldapCreatedUsers[] = $setting["userid"];
$this->theLdapUsersHaveBeenReSynced();
}
/**
@@ -854,7 +852,6 @@ trait Provisioning {
);
$this->rememberThatGroupIsNotExpectedToExist($group);
}
$this->theLdapUsersHaveBeenResynced();
}
/**
@@ -1102,8 +1099,6 @@ trait Provisioning {
$userAttributes['password'],
$this->getStepLineRef()
);
// We don't need to set displayName and email while running in oCIS
// As they are set when creating the user
}
if (isset($exceptionToThrow)) {
@@ -1455,11 +1450,11 @@ trait Provisioning {
$email = $user . '@owncloud.com';
$bodyTable = new TableNode(
[
['userid', $user],
['password', $password],
['username', $user],
['email', $email]
]
['userid', $user],
['password', $password],
['username', $user],
['email', $email]
]
);
$this->emptyLastHTTPStatusCodesArray();
$this->emptyLastOCSStatusCodesArray();
@@ -1522,11 +1517,11 @@ trait Provisioning {
$email = $userToCreate . '@owncloud.com';
$bodyTable = new TableNode(
[
['userid', $userToCreate],
['password', $password],
['username', $userToCreate],
['email', $email]
]
['userid', $userToCreate],
['password', $password],
['username', $userToCreate],
['email', $email]
]
);
$this->ocsContext->userSendsHTTPMethodToOcsApiEndpointWithBody(
$user,
@@ -1564,12 +1559,12 @@ trait Provisioning {
$email = $user . '@owncloud.com';
$bodyTable = new TableNode(
[
['userid', $user],
['password', $password],
['username', $user],
['email', $email],
['groups[]', $group],
]
['userid', $user],
['password', $password],
['username', $user],
['email', $email],
['groups[]', $group],
]
);
$this->ocsContext->userSendsHTTPMethodToOcsApiEndpointWithBody(
$this->getAdminUsername(),
@@ -1610,12 +1605,12 @@ trait Provisioning {
$email = $userToCreate . '@owncloud.com';
$bodyTable = new TableNode(
[
['userid', $userToCreate],
['password', $userToCreate],
['username', $userToCreate],
['email', $email],
['groups[]', $group],
]
['userid', $userToCreate],
['password', $userToCreate],
['username', $userToCreate],
['email', $email],
['groups[]', $group],
]
);
$this->ocsContext->userSendsHTTPMethodToOcsApiEndpointWithBody(
$groupadmin,
@@ -1655,12 +1650,12 @@ trait Provisioning {
$email = $userToCreate . '@owncloud.com';
$bodyTable = new TableNode(
[
['userid', $userToCreate],
['password', $userToCreate],
['username', $userToCreate],
['email', $email],
['groups[]', $group],
]
['userid', $userToCreate],
['password', $userToCreate],
['username', $userToCreate],
['email', $email],
['groups[]', $group],
]
);
$this->ocsContext->userSendsHTTPMethodToOcsApiEndpointWithBody(
$groupadmin,
@@ -3975,7 +3970,6 @@ trait Provisioning {
$ldapEntry = $this->ldap->getEntry($entry . "," . $this->ldapBaseDN);
Laminas\Ldap\Attribute::setAttribute($ldapEntry, $attribute, $value, $append);
$this->ldap->update($entry . "," . $this->ldapBaseDN, $ldapEntry);
$this->theLdapUsersHaveBeenReSynced();
}
/**
@@ -4049,7 +4043,6 @@ trait Provisioning {
$memberAttr,
"cn=$group,ou=$ou"
);
$this->theLdapUsersHaveBeenReSynced();
}
/**
@@ -4060,7 +4053,6 @@ trait Provisioning {
*/
public function deleteTheLdapEntry(string $entry):void {
$this->ldap->delete($entry . "," . $this->ldapBaseDN);
$this->theLdapUsersHaveBeenReSynced();
}
/**
@@ -4076,7 +4068,6 @@ trait Provisioning {
$ou = $this->getLdapGroupsOU();
}
$this->deleteTheLdapEntry("cn=$group,ou=$ou");
$this->theLdapUsersHaveBeenReSynced();
$key = \array_search($group, $this->ldapCreatedGroups);
if ($key !== false) {
unset($this->ldapCreatedGroups[$key]);
@@ -4123,7 +4114,6 @@ trait Provisioning {
$entry,
$displayName
);
$this->theLdapUsersHaveBeenReSynced();
}
/**
@@ -5674,7 +5664,6 @@ trait Provisioning {
*/
public function afterScenario():void {
$this->waitForDavRequestsToFinish();
$this->restoreParametersAfterScenario();
if ($this->someUsersHaveBeenCreated()) {
foreach ($this->getCreatedUsers() as $user) {