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

allow filtering occ files_external:list to storages applicable for a user #34655

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

icewind1991
Copy link
Member

No description provided.

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Oct 18, 2022
@icewind1991 icewind1991 added this to the Nextcloud 26 milestone Oct 18, 2022
@icewind1991 icewind1991 requested review from a team, blizzz, juliushaertl and CarlSchwan and removed request for a team October 18, 2022 13:23
@szaimen
Copy link
Contributor

szaimen commented Oct 18, 2022

@icewind1991 what does this fix or improve?

@@ -117,7 +124,7 @@
* @param InputInterface $input
* @param OutputInterface $output
*/
public function listMounts($userId, array $mounts, InputInterface $input, OutputInterface $output) {
public function listMounts(string $userId, array $mounts, InputInterface $input, OutputInterface $output) {

Check notice

Code scanning / Psalm

MissingReturnType

Method OCA\Files_External\Command\ListCommand::listMounts does not have a return type, expecting void
@@ -262,7 +269,7 @@
}
}

protected function getStorageService($userId) {
protected function getStorageService(string $userId) {

Check notice

Code scanning / Psalm

MissingReturnType

Method OCA\Files_External\Command\ListCommand::getStorageService does not have a return type, expecting OCA\Files_External\Service\GlobalStoragesService|OCA\Files_External\Service\UserStoragesService
@PVince81
Copy link
Member

can be useful in support.
more than once I wanted to ask someone to run this command to see what ext storages are visible only for a problematic user instead of all of them
in many cases you can't infer this from the config when groups are used in "applicable" and the user is member of that

return 1;
}
$mounts = $this->userGlobalService->getAllStoragesForUser($forUser);
$userId = self::ALL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit quirky but does the job

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 see minor comments

@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
@icewind1991 icewind1991 force-pushed the external-list-for branch 3 times, most recently from 7d84602 to 8497e4e Compare April 4, 2023 12:23
…user

Signed-off-by: Robin Appelman <robin@icewind.nl>
@github-advanced-security
Copy link

You have successfully added a new Psalm configuration .github/workflows/psalm-github.yml:psalm. As part of the setup process, we have scanned this repository and found 3 existing alerts. Please check the repository Security tab to see all alerts.

@github-advanced-security
Copy link

You have successfully added a new Psalm configuration .github/workflows/psalm-security.yml:psalm. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@icewind1991 icewind1991 requested a review from come-nc April 4, 2023 14:45
}
$mounts = $this->userGlobalService->getAllStoragesForUser($forUser);
$userId = self::ALL;
} else if ($input->getOption('all')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} else if ($input->getOption('all')) {
} elseif ($input->getOption('all')) {

@@ -77,13 +86,26 @@ protected function configure(): void {
'a',
InputOption::VALUE_NONE,
'show both system wide mounts and all personal mounts'
)->addOption(
'for',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear reading the description what is the difference between occ files_external:list user and occ files_external:list --for user.
Also occ files_external:list user1 --for user2 is allowed but will ignore user1?

This was referenced May 3, 2023
@skjnldsv skjnldsv modified the milestones: Nextcloud 27, Nextcloud 28 May 9, 2023
@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
This was referenced Mar 12, 2024
This was referenced Mar 20, 2024
@skjnldsv skjnldsv mentioned this pull request Mar 28, 2024
81 tasks
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants