@@ -52,10 +52,17 @@ public void restrictedResultWithoutScope() throws Exception {
5252 .andExpect (jsonPath ("$.data[1].relationships" , not (hasKey ("uniqueIds" ))))
5353 .andExpect (jsonPath ("$.data[2].relationships" , not (hasKey ("uniqueIds" ))))
5454 .andExpect (jsonPath ("$.data[3].relationships" , not (hasKey ("uniqueIds" ))))
55+ .andExpect (jsonPath ("$.data[0].relationships" , not (hasKey ("accountLinks" ))))
56+ .andExpect (jsonPath ("$.data[1].relationships" , not (hasKey ("accountLinks" ))))
57+ .andExpect (jsonPath ("$.data[2].relationships" , not (hasKey ("accountLinks" ))))
58+ .andExpect (jsonPath ("$.data[3].relationships" , not (hasKey ("accountLinks" ))))
5559 // you are allowed to see your own stuff
5660 .andExpect (jsonPath ("$.data[4].attributes.email" , is ("active-user@faforever.com" )))
5761 .andExpect (jsonPath ("$.data[4].attributes.recentIpAddress" , is ("127.0.0.1" )))
5862 .andExpect (jsonPath ("$.data[4].attributes" , hasKey ("lastLogin" )))
63+ .andExpect (jsonPath ("$.data[4].relationships" , hasKey ("reporterOnModerationReports" )))
64+ .andExpect (jsonPath ("$.data[4].relationships" , hasKey ("userGroups" )))
65+ .andExpect (jsonPath ("$.data[4].relationships" , hasKey ("accountLinks" )))
5966 // you cannot see your uuid
6067 .andExpect (jsonPath ("$.data[4].relationships" , not (hasKey ("uniqueIds" ))))
6168 // nobody can see passwords!
@@ -104,12 +111,17 @@ public void restrictedResultWithoutRole() throws Exception {
104111 .andExpect (jsonPath ("$.data[1].relationships" , not (hasKey ("uniqueIds" ))))
105112 .andExpect (jsonPath ("$.data[2].relationships" , not (hasKey ("uniqueIds" ))))
106113 .andExpect (jsonPath ("$.data[3].relationships" , not (hasKey ("uniqueIds" ))))
114+ .andExpect (jsonPath ("$.data[0].relationships" , not (hasKey ("accountLinks" ))))
115+ .andExpect (jsonPath ("$.data[1].relationships" , not (hasKey ("accountLinks" ))))
116+ .andExpect (jsonPath ("$.data[2].relationships" , not (hasKey ("accountLinks" ))))
117+ .andExpect (jsonPath ("$.data[3].relationships" , not (hasKey ("accountLinks" ))))
107118 // you are allowed to see your own stuff
108119 .andExpect (jsonPath ("$.data[4].attributes.email" , is ("active-user@faforever.com" )))
109120 .andExpect (jsonPath ("$.data[4].attributes.recentIpAddress" , is ("127.0.0.1" )))
110121 .andExpect (jsonPath ("$.data[4].attributes" , hasKey ("lastLogin" )))
111122 .andExpect (jsonPath ("$.data[4].relationships" , hasKey ("reporterOnModerationReports" )))
112123 .andExpect (jsonPath ("$.data[4].relationships" , hasKey ("userGroups" )))
124+ .andExpect (jsonPath ("$.data[4].relationships" , hasKey ("accountLinks" )))
113125 // you cannot see your uuid
114126 .andExpect (jsonPath ("$.data[4].relationships" , not (hasKey ("uniqueIds" ))))
115127 // nobody can see passwords!
@@ -162,6 +174,11 @@ public void canSeePrivateDetailsWithScopeAndRole() throws Exception {
162174 .andExpect (jsonPath ("$.data[2].relationships" , hasKey ("uniqueIds" )))
163175 .andExpect (jsonPath ("$.data[3].relationships" , hasKey ("uniqueIds" )))
164176 .andExpect (jsonPath ("$.data[4].relationships" , hasKey ("uniqueIds" )))
177+ .andExpect (jsonPath ("$.data[0].relationships" , hasKey ("accountLinks" )))
178+ .andExpect (jsonPath ("$.data[1].relationships" , hasKey ("accountLinks" )))
179+ .andExpect (jsonPath ("$.data[2].relationships" , hasKey ("accountLinks" )))
180+ .andExpect (jsonPath ("$.data[3].relationships" , hasKey ("accountLinks" )))
181+ .andExpect (jsonPath ("$.data[4].relationships" , hasKey ("accountLinks" )))
165182 // cannot see others reporterOnModerationReports
166183 .andExpect (jsonPath ("$.data[0].relationships" , not (hasKey ("reporterOnModerationReports" ))))
167184 .andExpect (jsonPath ("$.data[1].relationships" , not (hasKey ("reporterOnModerationReports" ))))
0 commit comments