Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Feb 27, 2024

Backport of #43727

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot requested review from artonge, skjnldsv and susnux February 27, 2024 15:44
@backportbot backportbot bot added 3. to review Waiting for reviews feature: versions javascript php Pull requests that update Php code labels Feb 27, 2024
@artonge artonge force-pushed the backport/43727/stable23 branch from 20cec42 to b6ef916 Compare February 27, 2024 15:48
@artonge artonge changed the title [stable23] Check share status when touching versions [stable23] Check share status when restoring versions Feb 27, 2024
@artonge artonge marked this pull request as ready for review February 27, 2024 15:50
@artonge artonge force-pushed the backport/43727/stable23 branch from b6ef916 to bbb88e8 Compare February 27, 2024 17:00

private function currentUserHasPermissions(IVersion $version, int $permissions): bool {
$sourceFile = $version->getSourceFile();
$currentUserId = $this->userSession->getUser()->getUID();

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getUID on possibly null value
$sourceFile = $version->getSourceFile();
$currentUserId = $this->userSession->getUser()->getUID();

if ($currentUserId === null) {

Check notice

Code scanning / Psalm

DocblockTypeContradiction

string does not contain null
@artonge artonge force-pushed the backport/43727/stable23 branch from bbb88e8 to db2085c Compare February 28, 2024 09:18
@skjnldsv skjnldsv merged commit c4ab94e into stable23 Feb 28, 2024
@skjnldsv skjnldsv deleted the backport/43727/stable23 branch February 28, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: versions javascript php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants