Skip to content

Commit 49d60d6

Browse files
committed
Use the new user-access API
1 parent de8acd8 commit 49d60d6

File tree

9 files changed

+462
-317
lines changed

9 files changed

+462
-317
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"guzzlehttp/guzzle": "^5.3",
99
"guzzlehttp/ringphp": "^1.1",
1010
"platformsh/console-form": ">=0.0.37 <2.0",
11-
"platformsh/client": ">=0.78.1 <2.0",
11+
"platformsh/client": ">=0.79.2 <2.0",
1212
"symfony/console": "^3.0 >=3.2",
1313
"symfony/yaml": "^3.0 || ^2.6",
1414
"symfony/finder": "^3.0",

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Command/CompletionCommand.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,12 @@ protected function runCompletion()
7272
Completion::TYPE_ARGUMENT,
7373
[$this, 'getEnvironmentsForCheckout']
7474
),
75-
new Completion(
76-
'user:role',
77-
'email',
78-
Completion::TYPE_ARGUMENT,
79-
[$this, 'getUserEmails']
80-
),
8175
new Completion(
8276
'user:role',
8377
'level',
8478
Completion::TYPE_OPTION,
8579
['project', 'environment']
8680
),
87-
new Completion(
88-
'user:delete',
89-
'email',
90-
Completion::TYPE_ARGUMENT,
91-
[$this, 'getUserEmails']
92-
),
9381
new Completion\ShellPathCompletion(
9482
'ssh-key:add',
9583
'path',
@@ -288,27 +276,6 @@ public function getEnvironments()
288276
return array_keys($this->api->getEnvironments($project, false, false));
289277
}
290278

291-
/**
292-
* Get a list of user email addresses.
293-
*
294-
* @return string[]
295-
*/
296-
public function getUserEmails()
297-
{
298-
$project = $this->getProject();
299-
if (!$project) {
300-
return [];
301-
}
302-
303-
$emails = [];
304-
foreach ($this->api->getProjectAccesses($project) as $projectAccess) {
305-
$account = $this->api->getAccount($projectAccess);
306-
$emails[] = $account['email'];
307-
}
308-
309-
return $emails;
310-
}
311-
312279
/**
313280
* Get the project ID the user has already entered on the command line.
314281
*

0 commit comments

Comments
 (0)