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 14:46
@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/stable25 branch from 23037ff to f8b8005 Compare February 27, 2024 14:51
@artonge artonge changed the title [stable25] Check share status when touching versions [stable25] Check share status when restoring versions Feb 27, 2024
@artonge artonge marked this pull request as ready for review February 27, 2024 14:54
@artonge artonge added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 27, 2024
@artonge artonge force-pushed the backport/43727/stable25 branch from f8b8005 to 147d84c Compare February 27, 2024 17:01

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/stable25 branch from 147d84c to e243dd7 Compare February 28, 2024 09:10
@skjnldsv skjnldsv merged commit cf2fad5 into stable25 Feb 28, 2024
@skjnldsv skjnldsv deleted the backport/43727/stable25 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

4. to release Ready to be released and/or waiting for tests to finish 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