Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Apr 3, 2025

Backport of #51745

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot added bug 3. to review Waiting for reviews labels Apr 3, 2025
@backportbot backportbot bot added this to the Nextcloud 30.0.9 milestone Apr 3, 2025
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange === true && (
$targetUser->getBackend() instanceof ISetDisplayNameBackend
|| $targetUser->getBackend()->implementsActions(Backend::SET_DISPLAYNAME)

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method implementsActions on possibly null value
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange === true && (
$targetUser->getBackend() instanceof ISetDisplayNameBackend
|| $targetUser->getBackend()->implementsActions(Backend::SET_DISPLAYNAME)

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OCP\UserInterface::implementsActions has been marked as deprecated
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange !== false && (
$targetUser->getBackend() instanceof ISetDisplayNameBackend
|| $targetUser->getBackend()->implementsActions(Backend::SET_DISPLAYNAME)

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method implementsActions on possibly null value
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange !== false && (
$targetUser->getBackend() instanceof ISetDisplayNameBackend
|| $targetUser->getBackend()->implementsActions(Backend::SET_DISPLAYNAME)

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OCP\UserInterface::implementsActions has been marked as deprecated
@susnux susnux force-pushed the backport/51745/stable30 branch from 747c3b9 to 9d1bace Compare April 3, 2025 06:42
@susnux susnux marked this pull request as ready for review April 3, 2025 06:42
@susnux susnux force-pushed the backport/51745/stable30 branch from 9d1bace to b8203dd Compare April 3, 2025 06:45
@susnux
Copy link
Contributor

susnux commented Apr 3, 2025

/compile

$accountParameters = [
'avatarChangeSupported' => $user->canChangeAvatar(),
'displayNameChangeSupported' => $user->canChangeDisplayName(),
'emailChangeSupported' => $user->canChangeEmail(),

Check notice

Code scanning / Psalm

UndefinedInterfaceMethod Note

Method OCP\IUser::canChangeEmail does not exist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems legit @susnux ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but intentional.
Its not on the public interface (no backport of public interface changes), but on the private implementation.

$permittedFields[] = IAccountManager::PROPERTY_DISPLAYNAME;
}
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange !== false && (

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method getUID on possibly null value
@Altahrim Altahrim mentioned this pull request Apr 3, 2025
5 tasks
provokateurin and others added 3 commits April 3, 2025 16:12
…y name change restriction

Co-authored-by: provokateurin <kate@provokateurin.de>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Louis <louis@chmn.me>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@Altahrim Altahrim force-pushed the backport/51745/stable30 branch from 1af09b0 to 185e97b Compare April 3, 2025 14:12
@Altahrim
Copy link
Collaborator

Altahrim commented Apr 3, 2025

Rebased

@Altahrim Altahrim enabled auto-merge April 3, 2025 14:32
@Altahrim Altahrim merged commit 2f22c0d into stable30 Apr 3, 2025
182 of 190 checks passed
@Altahrim Altahrim deleted the backport/51745/stable30 branch April 3, 2025 15:21
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 bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants