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

[stable23] Check share status when restoring versions #43874

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 [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

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
Signed-off-by: Louis Chemineau <louis@chmn.me>
@skjnldsv skjnldsv merged commit c4ab94e into stable23 Feb 28, 2024
26 of 28 checks passed
@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.

2 participants