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

[stable24] Check share status when restoring versions #43871

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

backportbot[bot]
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 added 3. to review Waiting for reviews feature: versions javascript php Pull requests that update Php code labels Feb 27, 2024
@artonge artonge changed the title [stable24] Check share status when touching versions [stable24] 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

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

Check notice

Code scanning / Psalm

PossiblyNullReference Note

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 Note

string does not contain null
@artonge
Copy link
Contributor

artonge commented Feb 28, 2024

CI failure unrelated

Signed-off-by: Louis Chemineau <louis@chmn.me>
@skjnldsv skjnldsv merged commit d7cc59b into stable24 Feb 28, 2024
26 of 28 checks passed
@skjnldsv skjnldsv deleted the backport/43727/stable24 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.

2 participants