Skip to content

Implement ISetDisplayNameBackend in the user backend #1052

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

julien-nc
Copy link
Member

closes #965

This fixes incorrect photo in system addressbook vcard (it was always an avatar based on the previous display name or the user ID for new users).
The server apparently behaves differently if the user backend is a ISetDisplayNameBackend one or not.
This change also simplifies the provisioning service.

To reproduce the initial issue:

  • create a user on the Idp side with a user ID equal to aaa for example, a first name of Jane and a last name of Doe
  • Login with this user via user_oidc
  • Check the system address book in the contacts app. The Jane Doe contact's photo is just an A. It should be JD.
  • Change the first name to Zen on the IdP side
  • Login again
  • The contact photo is now JD and should be ZD

@julien-nc julien-nc added bug Something isn't working 3. to review labels Feb 11, 2025
@julien-nc julien-nc force-pushed the fix/965/provisioning-display-name branch 3 times, most recently from b6ba87f to 84faf55 Compare February 18, 2025 12:32
@julien-nc julien-nc force-pushed the fix/965/provisioning-display-name branch from 84faf55 to 382a366 Compare March 3, 2025 11:28
…ect photo in system addressbook vcard and simplifies the provisioning service

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc force-pushed the fix/965/provisioning-display-name branch from 382a366 to 1008f61 Compare March 3, 2025 12:50
use Psr\Log\LoggerInterface;

class Backend extends ABackend implements IPasswordConfirmationBackend, IGetDisplayNameBackend, IApacheBackend, ICustomLogout, ICountUsersBackend {
class Backend extends ABackend implements IPasswordConfirmationBackend, IGetDisplayNameBackend, ISetDisplayNameBackend, IApacheBackend, ICustomLogout, ICountUsersBackend {
Copy link
Member

Choose a reason for hiding this comment

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

This would mean that users can change the displayname also trough the Nextcloud profile page, no?

Since the IdP has authority over the display name that is used, we should not implement this interface I think.

Copy link
Member

@solracsf solracsf May 13, 2025

Choose a reason for hiding this comment

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

Can confirm that displayName can be changed trough the Nextcloud profile page when this is implemented (manually patched NC v30.0.10 with App v7.2.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: The default profile picture gets the wrong value (letters) on some pages with OIDC
3 participants