Skip to content

[stable23] Check share status when restoring versions - #43874

Merged
skjnldsv merged 1 commit into
stable23from
backport/43727/stable23
Feb 28, 2024
Merged

[stable23] Check share status when restoring versions#43874
skjnldsv merged 1 commit into
stable23from
backport/43727/stable23

Conversation

@backportbot

@backportbotbackportbotBot commented Feb 27, 2024

Copy link
Copy Markdown

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.

@backportbotbackportbotBot added 3. to review Waiting for reviews feature: versions javascript php Pull requests that update Php code labels Feb 27, 2024
@artonge
artongeforce-pushed the backport/43727/stable23 branch from 20cec42 to b6ef916CompareFebruary 27, 2024 15:48
@artongeartonge changed the title [stable23] Check share status when touching versions[stable23] Check share status when restoring versionsFeb 27, 2024
@artonge
artonge marked this pull request as ready for review February 27, 2024 15:50
@artonge
artongeforce-pushed the backport/43727/stable23 branch from b6ef916 to bbb88e8CompareFebruary 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
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge
artongeforce-pushed the backport/43727/stable23 branch from bbb88e8 to db2085cCompareFebruary 28, 2024 09:18
@skjnldsv
skjnldsv merged commit c4ab94e into stable23Feb 28, 2024
@skjnldsv
skjnldsv deleted the backport/43727/stable23 branch February 28, 2024 11:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: versionsjavascriptphpPull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@artonge@github-advanced-security@skjnldsv