Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new user-access API #1374

Merged
merged 3 commits into from
Dec 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
"guzzlehttp/guzzle": "^5.3",
"guzzlehttp/ringphp": "^1.1",
"platformsh/console-form": ">=0.0.37 <2.0",
"platformsh/client": ">=0.78.1 <2.0",
"platformsh/client": ">=0.79.3 <2.0",
"symfony/console": "^3.0 >=3.2",
"symfony/yaml": "^3.0 || ^2.6",
"symfony/finder": "^3.0",
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions config-defaults.yaml
Original file line number Diff line number Diff line change
@@ -269,10 +269,6 @@ api:
# Whether Centralized User Management is available (requires "organizations").
centralized_permissions: false

# Whether the projects list should be fetched from the newer "extended-access" API instead of "/me".
# Ignored if "centralized_permissions" is not enabled.
projects_list_new: true

# Filter the projects or organizations list by a vendor name.
# This can be null for no filtering, or a string or a list of strings.
vendor_filter: null
33 changes: 0 additions & 33 deletions src/Command/CompletionCommand.php
Original file line number Diff line number Diff line change
@@ -72,24 +72,12 @@ protected function runCompletion()
Completion::TYPE_ARGUMENT,
[$this, 'getEnvironmentsForCheckout']
),
new Completion(
'user:role',
'email',
Completion::TYPE_ARGUMENT,
[$this, 'getUserEmails']
),
new Completion(
'user:role',
'level',
Completion::TYPE_OPTION,
['project', 'environment']
),
new Completion(
'user:delete',
'email',
Completion::TYPE_ARGUMENT,
[$this, 'getUserEmails']
),
new Completion\ShellPathCompletion(
'ssh-key:add',
'path',
@@ -288,27 +276,6 @@ public function getEnvironments()
return array_keys($this->api->getEnvironments($project, false, false));
}

/**
* Get a list of user email addresses.
*
* @return string[]
*/
public function getUserEmails()
{
$project = $this->getProject();
if (!$project) {
return [];
}

$emails = [];
foreach ($this->api->getProjectAccesses($project) as $projectAccess) {
$account = $this->api->getAccount($projectAccess);
$emails[] = $account['email'];
}

return $emails;
}

/**
* Get the project ID the user has already entered on the command line.
*
Loading