nextcloud / nextcloud/user_oidc
[Bug]: The searchDisplayName function returns a duplicate user_oidc
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 181
- Forks
- 60
- Avg merge
- 7h 34m
- Merged PRs (30d)
- 26
Description
Hi everyone :)
I find an issue on the user_oidc app and the backend system.
When I would like to list users from my API route, I get a duplicate users_oidc.
[
{
"uid": "cdupont",
"display_name": "Christine Dupont",
"backend_name": "LDAP"
},
{
"uid": "channel",
"display_name": "Christiane Hannel",
"backend_name": "LDAP"
},
{
"uid": "company-sso-test-fg11t142-98cb-4931-a2r6-61a28b9f1c32",
"display_name": "jcfoo Foo",
"backend_name": "user_oidc"
},
{
"uid": "company-sso-test-fg11t142-98cb-4931-a2r6-61a28b9f1c32",
"display_name": "jcfoo Foo",
"backend_name": "user_oidc"
},
{
"uid": "company-sso-test-fg11t142-98cb-4931-a2r6-61a28b9f1c32",
"display_name": "jcfoo Foo",
"backend_name": "user_oidc"
}
]
My route is https://mylocal/index.php/apps/workspace/api/autoComplete/c/16 and the bug seems to be on the searchDisplayName function from OCP\IUserManager. But, I am not sure.
I expected to have this result :
[
{
"uid": "cdupont",
"display_name": "Christine Dupont",
"backend_name": "LDAP"
},
{
"uid": "channel",
"display_name": "Christiane Hannel",
"backend_name": "LDAP"
},
{
"uid": "company-sso-test-fg11t142-98cb-4931-a2r6-61a28b9f1c32",
"display_name": "jmfoo Foo",
"backend_name": "user_oidc"
},
]
To reproduce
- Install the
groupfoldersapp, first, then theworkspaceapp. - Following these instructions to configure the workspace app : https://github.com/arawa/workspace/#-configure-groupfolders-for-workspace.
- Create a workspace from the workspace app.
- With Postman or Insomnia, execute this request
https://mylocal/index.php/apps/workspace/api/autoComplete/c/1.
ℹ️ The letter
ccorresponds to a letter in the uid of an user (example:channelorjcfoo).
- Finally, you get the same result as me.
Nextcloud version
I use the Nextcloud 26.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the referenced searchDisplayName call in lib/Service/WorkspaceService.php and trace how the user_oidc backend results are collected for the autocomplete API. Reproduce the request described with Nextcloud 26, then identify where the same user is added repeatedly; done means the response contains each matching user once with the expected fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100