Skip to content

Commit

Permalink
only send userid and password on user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it committed Jul 30, 2020
1 parent 8520b67 commit 4bc7efe
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/acceptance/features/bootstrap/Provisioning.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ public function buildUsersAttributesArray($setDefaultAttributes, $table) {
$usersAttributes = [];
foreach ($table as $row) {
$userAttribute['userid'] = $this->getActualUsername($row['username']);

if (isset($row['displayname'])) {
$userAttribute['displayName'] = $row['displayname'];
} elseif ($setDefaultAttributes) {
Expand Down Expand Up @@ -837,12 +838,22 @@ public function usersHaveBeenCreated(
if ($this->isTestingWithLdap()) {
$this->createLdapUser($userAttributes);
} else {
$attributesToCreateUser['userid'] = $userAttributes['userid'];
$attributesToCreateUser['password'] = $userAttributes['password'];
if (OcisHelper::isTestingOnOcis()) {
$attributesToCreateUser['username'] = $userAttributes['userid'];
if ($userAttributes['email'] === null) {
$attributesToCreateUser['email'] = $userAttributes['username'] . '@owncloud.org';
} else {
$attributesToCreateUser['email'] = $userAttributes['email'];
}
}
// Create a OCS request for creating the user. The request is not sent to the server yet.
$request = OcsApiHelper::createOcsRequest(
$this->getBaseUrl(),
'POST',
"/cloud/users",
$userAttributes
$attributesToCreateUser
);
// Add the request to the $requests array so that they can be sent in parallel.
\array_push($requests, $request);
Expand Down

0 comments on commit 4bc7efe

Please sign in to comment.