@@ -9,7 +9,7 @@ Feature: edit/search user including email
99 | displayName | Brian Murphy |
1010 | email | brian @example .com |
1111 | password | 1234 |
12- And the config "OCIS_SHOW_USER_EMAIL_IN_RESULTS " has been set to "true " for "graph" service
12+ And the config "OCIS_USER_SEARCH_DISPLAYED_ATTRIBUTES " has been set to "mail " for "graph" service
1313
1414
1515 Scenario Outline : admin user can edit another user's email
@@ -281,7 +281,8 @@ Feature: edit/search user including email
281281 "attributes": {
282282 "type": "array",
283283 "maxItems": 1,
284- "minItems": 1
284+ "minItems": 1,
285+ 285286 },
286287 "displayName": {
287288 "const": "Alice Hansen"
@@ -331,7 +332,8 @@ Feature: edit/search user including email
331332 "attributes": {
332333 "type": "array",
333334 "maxItems": 1,
334- "minItems": 1
335+ "minItems": 1,
336+ 335337 },
336338 "displayName": {
337339 "const": "Alice Hansen"
@@ -380,7 +382,8 @@ Feature: edit/search user including email
380382 "attributes": {
381383 "type": "array",
382384 "maxItems": 1,
383- "minItems": 1
385+ "minItems": 1,
386+ 384387 },
385388 "displayName": {
386389 "const": "Alice Hansen"
@@ -490,8 +493,8 @@ Feature: edit/search user including email
490493 """
491494
492495
493- Scenario Outline : search other users when OCIS_SHOW_USER_EMAIL_IN_RESULTS config is disabled
494- Given the config "OCIS_SHOW_USER_EMAIL_IN_RESULTS " has been set to "false " for "graph" service
496+ Scenario Outline : search other users when OCIS_USER_SEARCH_DISPLAYED_ATTRIBUTES config is disabled
497+ Given the config "OCIS_USER_SEARCH_DISPLAYED_ATTRIBUTES " has been set to "" for "graph" service
495498 And the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
496499 When user "Alice" searches for user "Brian" using Graph API
497500 Then the HTTP status code should be "200"
@@ -501,3 +504,48 @@ Feature: edit/search user including email
501504 | Space Admin |
502505 | User |
503506 | User Light |
507+
508+
509+ Scenario : non-admin user searches other users by e-mail
510+ Given the following configs have been set:
511+ | config | value |
512+ | OCIS_USER_SEARCH_DISPLAYED_ATTRIBUTES | |
513+ | OCIS_SHOW_USER_EMAIL_IN_RESULTS | true |
514+ And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
515+ When user "Alice" gets information of user "Brian" using Graph API
516+ Then the HTTP status code should be "200"
517+ And the JSON data of the response should match
518+ """
519+ {
520+ "type": "object",
521+ "required": [
522+ "displayName",
523+ "id",
524+ "mail",
525+ "onPremisesSamAccountName",
526+ "accountEnabled",
527+ "userType"
528+ ],
529+ "properties": {
530+ "displayName": {
531+ "const": "Brian Murphy"
532+ },
533+ "id" : {
534+ "type": "string",
535+ "pattern": "^%user_id_pattern%$"
536+ },
537+ "mail": {
538+ 539+ },
540+ "onPremisesSamAccountName": {
541+ "const": "Brian"
542+ },
543+ "accountEnabled": {
544+ "const": true
545+ },
546+ "userType": {
547+ "const": "Member"
548+ }
549+ }
550+ }
551+ """
0 commit comments