Skip to content
Open
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
8 changes: 4 additions & 4 deletions lib/Service/PermissionsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public function canDeleteRowsByTableId(?int $tableId = null, ?string $userId = n
public function canReadShare(Share $share, ?string $userId = null): bool {
try {
$userId = $this->preCheckUserId($userId);
} catch (InternalError $e) {
} catch (InternalError) {
$this->logger->warning('Cannot pre check the user id, permission denied');
return false;
}
Expand All @@ -392,7 +392,7 @@ public function canReadShare(Share $share, ?string $userId = null): bool {
if ($this->canManageElementById($share->getNodeId(), $share->getNodeType())) {
return true;
}
} catch (InternalError $e) {
} catch (InternalError) {
$this->logger->warning('Cannot check manage permissions, permission denied');
return false;
}
Expand All @@ -410,11 +410,11 @@ public function canReadShare(Share $share, ?string $userId = null): bool {
try {
$userGroups = $this->userHelper->getGroupsForUser($userId);
foreach ($userGroups as $userGroup) {
if ($userGroup->getDisplayName() === $share->getReceiver()) {
if ($userGroup->getGID() === $share->getReceiver()) {
return true;
}
}
} catch (InternalError $e) {
} catch (InternalError) {
$this->logger->warning('Cannot get user groups, permission denied');
return false;
}
Expand Down
Loading