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

Show DisplayName instead of uid attribute for LDAP users #1079

Closed
ke-lin opened this issue Mar 7, 2021 · 12 comments · Fixed by #1211
Closed

Show DisplayName instead of uid attribute for LDAP users #1079

ke-lin opened this issue Mar 7, 2021 · 12 comments · Fixed by #1211

Comments

@ke-lin
Copy link

ke-lin commented Mar 7, 2021

Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Is your feature request related to a problem? Please describe.

The Notes App shows the uid attribute of LDAP users, which is a long cryptic string. This makes switching between different accounts difficult and does not look so nice.

Describe the solution you'd like

It would be nice to use the DisplayName attribute for LDAP user for the app "username" attribute, instead of the uid.

@MasterWanna
Copy link
Contributor

Hi, developer. Does this issue still need to fix since the similar issue is closed in nextcloud-deck?

@stefan-niedermann
Copy link
Member

Yes, in Notes this issue still exists. It was a bit easier in Deck because we already called the correct endpoint which we are not yet doing in the Notes app. Additionally we just had a 7000 code lines refactoring and more work in progress, so it will take some time more to implement this for the Notes app.

@MasterWanna
Copy link
Contributor

Thanks, and I would try to fix this in a few days similarly to method in nextcloud-deck.

@stefan-niedermann
Copy link
Member

I would do a few things different, since we don't need a separate users entity in the Notes app. Just add a displayName property to the Account entity and fetch it whenever the Capabilities are queried from the server.

@MasterWanna
Copy link
Contributor

It is a bit hard, for I cannot connect to the server, and can only do offline editing, so may not implement fetching in Capabilities

@stefan-niedermann
Copy link
Member

Sorry, i don't understand this...?

@MasterWanna
Copy link
Contributor

Oh, I got it. Is it that add displayName into Account, when switching accout, we should show displayName instead of userName and add a property displayName for the fetching of the account in Capabilities?

@stefan-niedermann
Copy link
Member

Is it that add displayName into Account

✔️

when switching accout, we should show displayName instead of userName

✔️

add a property displayName for the fetching of the account in Capabilities

When fetching the capabilities endpoint via a REST call, we will additionally need to fetch the users endpoint, because the capabilities endpoint does not return the display name. It will be simply one HTTP call more and the result can be written into Accounts.displayName then.

@MasterWanna
Copy link
Contributor

I have one more question that where should I fetch the displayName? For that, I think it maybe changed by the user on local device and just save into displayName each time.

@stefan-niedermann
Copy link
Member

For that, I think it maybe changed by the user on local device and just save into displayName each time.

It is not supposed to be editable on the local device

I have one more question that where should I fetch the displayName?

I don't know yet which endpoint it exactly is, you'll have to check out where the user endpoint is in the Deck app or check out the Nextcloud developer manual :)

@MasterWanna
Copy link
Contributor

Ok, I got it, it needs an overall consideration.

@stefan-niedermann
Copy link
Member

Will be fixed in v3.4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants