mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
feat: remove share status from share:list as it doesn't seem to contain usefull info at the moment
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
9626c08786
commit
b9723eaa22
1 changed files with 0 additions and 19 deletions
|
|
@ -34,12 +34,6 @@ class ListShares extends Base {
|
|||
IShare::TYPE_DECK => 'deck',
|
||||
];
|
||||
|
||||
private const SHARE_STATUS_NAMES = [
|
||||
IShare::STATUS_PENDING => 'pending',
|
||||
IShare::STATUS_ACCEPTED => 'accepted',
|
||||
IShare::STATUS_REJECTED => 'rejected',
|
||||
];
|
||||
|
||||
public function __construct(
|
||||
private readonly IManager $shareManager,
|
||||
private readonly IRootFolder $rootFolder,
|
||||
|
|
@ -85,7 +79,6 @@ class ListShares extends Base {
|
|||
'recipient' => $share->getSharedWith(),
|
||||
'by' => $share->getSharedBy(),
|
||||
'type' => self::SHARE_TYPE_NAMES[$share->getShareType()] ?? 'unknown',
|
||||
'status' => self::SHARE_STATUS_NAMES[$share->getStatus()] ?? 'unknown',
|
||||
];
|
||||
}, $shares);
|
||||
|
||||
|
|
@ -126,15 +119,6 @@ class ListShares extends Base {
|
|||
throw new \Exception("Unknown share type $type");
|
||||
}
|
||||
|
||||
private function getShareStatus(string $status): int {
|
||||
foreach (self::SHARE_STATUS_NAMES as $shareStatus => $shareStatusName) {
|
||||
if ($shareStatusName === $status) {
|
||||
return $shareStatus;
|
||||
}
|
||||
}
|
||||
throw new \Exception("Unknown share status $status");
|
||||
}
|
||||
|
||||
private function shouldShowShare(InputInterface $input, IShare $share): bool {
|
||||
if ($input->getOption('owner') && $share->getShareOwner() !== $input->getOption('owner')) {
|
||||
return false;
|
||||
|
|
@ -172,9 +156,6 @@ class ListShares extends Base {
|
|||
if ($input->getOption('type') && $share->getShareType() !== $this->getShareType($input->getOption('type'))) {
|
||||
return false;
|
||||
}
|
||||
if ($input->getOption('status') && $share->getStatus() !== $this->getShareStatus($input->getOption('status'))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue