fix: Show username in unprivileged search results (#2104)

* fix: Show username in unprivileged search results

`onPremisesSamAccountName` is a mandatory attribute according to the
spec. There's no harm in returning it in the search results also for
unprivileged users.

Fixes: #144

* adapt tests

* adapt tests

* adapt tests

---------

Co-authored-by: Viktor Scharf <v.scharf@opencloud.eu>
This commit is contained in:
Ralf Haferkamp
2026-01-07 12:43:27 +01:00
committed by GitHub
co-authored by Viktor Scharf
parent 0b6de8e92b
commit 6082e0c4df
4 changed files with 47 additions and 9 deletions
@@ -274,6 +274,7 @@ Feature: edit/search user including email
"required": [
"displayName",
"id",
"onPremisesSamAccountName",
"mail",
"userType"
],
@@ -285,6 +286,9 @@ Feature: edit/search user including email
"type": "string",
"pattern": "^%user_id_pattern%$"
},
"onPremisesSamAccountName": {
"const": "Alice"
},
"mail": {
"const": "alice@example.org"
},
@@ -366,6 +370,7 @@ Feature: edit/search user including email
"required": [
"displayName",
"id",
"onPremisesSamAccountName",
"mail",
"userType"
],
@@ -377,6 +382,9 @@ Feature: edit/search user including email
"type": "string",
"pattern": "^%user_id_pattern%$"
},
"onPremisesSamAccountName": {
"const": "Alice"
},
"mail": {
"const": "alice@example.org"
},
@@ -417,6 +425,7 @@ Feature: edit/search user including email
"required": [
"displayName",
"id",
"onPremisesSamAccountName",
"mail",
"userType"
],
@@ -428,6 +437,9 @@ Feature: edit/search user including email
"type": "string",
"pattern": "^%user_id_pattern%$"
},
"onPremisesSamAccountName": {
"const": "Alice"
},
"mail": {
"const": "alice@example.org"
},
@@ -452,6 +464,9 @@ Feature: edit/search user including email
"type": "string",
"pattern": "^%user_id_pattern%$"
},
"onPremisesSamAccountName": {
"const": "another-alice"
},
"mail": {
"const": "another-alice@example.org"
},