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:
co-authored by
Viktor Scharf
parent
0b6de8e92b
commit
6082e0c4df
@@ -1351,6 +1351,7 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"onPremisesSamAccountName",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1362,6 +1363,10 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"const": "Alice"
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"const": "Member"
|
||||
@@ -1456,6 +1461,7 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"onPremisesSamAccountName",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1467,6 +1473,10 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"const": "Alice"
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"const": "Member"
|
||||
@@ -1501,6 +1511,7 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"onPremisesSamAccountName",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1512,6 +1523,10 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"const": "Alice"
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"const": "Member"
|
||||
@@ -1530,7 +1545,6 @@ Feature: get users
|
||||
| displayName | Alice Hansen |
|
||||
| email | another-alice@example.org |
|
||||
| password | containsCharacters(*:!;_+-&) |
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
When user "Brian" searches for user "alice" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the search response should not contain users email
|
||||
@@ -1554,6 +1568,7 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"onPremisesSamAccountName",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1565,6 +1580,10 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"const": "Alice"
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"const": "Member"
|
||||
@@ -1576,6 +1595,7 @@ Feature: get users
|
||||
"required": [
|
||||
"displayName",
|
||||
"id",
|
||||
"onPremisesSamAccountName",
|
||||
"userType"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1587,11 +1607,13 @@ Feature: get users
|
||||
"type": "string",
|
||||
"pattern": "^%user_id_pattern%$"
|
||||
},
|
||||
"onPremisesSamAccountName": {
|
||||
"type": "string",
|
||||
"const": "another-alice"
|
||||
},
|
||||
"userType": {
|
||||
"type": "string",
|
||||
"const": [
|
||||
"Admin"
|
||||
]
|
||||
"const": "Member"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user