Skip to content

[stable30] fix: Return correct list of managers for a user - #48622

Merged
Altahrim merged 4 commits into
stable30from
backport/48538/stable30
Oct 30, 2024
Merged

[stable30] fix: Return correct list of managers for a user#48622
Altahrim merged 4 commits into
stable30from
backport/48538/stable30

Conversation

@backportbot

@backportbotbackportbotBot commented Oct 9, 2024

Copy link
Copy Markdown

Backport of #48538

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.

Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@Pytal
Pytalforce-pushed the backport/48538/stable30 branch from 9d43f66 to 221f7a3CompareOctober 9, 2024 21:53
@Pytal
Pytal marked this pull request as ready for review October 9, 2024 21:54
$currentLoggedInUser = $this->userSession->getUser();

$managerUids = $user->getManagerUids();
if ($this->groupManager->isAdmin($currentLoggedInUser->getUID()) || $this->groupManager->isDelegatedAdmin($currentLoggedInUser->getUID())) {

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getUID on possibly null value
return $managerUids;
}

if ($this->subAdminManager->isSubAdmin($currentLoggedInUser)) {

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of OCP\Group\ISubAdmin::isSubAdmin cannot be null, possibly null value provided
This was referenced Oct 10, 2024
@AltahrimAltahrim mentioned this pull request Oct 30, 2024
2 tasks
@Altahrim
Altahrim enabled auto-merge October 30, 2024 08:28
@Altahrim
Altahrim merged commit 22d9f90 into stable30Oct 30, 2024
@Altahrim
Altahrim deleted the backport/48538/stable30 branch October 30, 2024 08:41
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@artonge@Pytal@github-advanced-security@blizzz@Altahrim