1
0

sharees_provisioningapiv2.feature 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. # SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  2. # SPDX-FileCopyrightText: 2017 ownCloud, Inc.
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. Feature: sharees_provisioningapiv2
  5. Background:
  6. Given using api version "2"
  7. And user "test" exists
  8. And user "Sharee1" exists
  9. And group "ShareeGroup" exists
  10. And user "test" belongs to group "ShareeGroup"
  11. Scenario: Search without exact match
  12. Given As an "test"
  13. When getting sharees for
  14. | search | Sharee |
  15. | itemType | file |
  16. Then the OCS status code should be "200"
  17. And the HTTP status code should be "200"
  18. And "exact users" sharees returned is empty
  19. And "users" sharees returned are
  20. | Sharee1 | 0 | Sharee1 |
  21. And "exact groups" sharees returned is empty
  22. And "groups" sharees returned are
  23. | ShareeGroup | 1 | ShareeGroup |
  24. And "exact remotes" sharees returned is empty
  25. And "remotes" sharees returned is empty
  26. Scenario: Search without exact match not-exact casing
  27. Given As an "test"
  28. When getting sharees for
  29. | search | sharee |
  30. | itemType | file |
  31. Then the OCS status code should be "200"
  32. And the HTTP status code should be "200"
  33. And "exact users" sharees returned is empty
  34. And "users" sharees returned are
  35. | Sharee1 | 0 | Sharee1 |
  36. And "exact groups" sharees returned is empty
  37. And "groups" sharees returned are
  38. | ShareeGroup | 1 | ShareeGroup |
  39. And "exact remotes" sharees returned is empty
  40. And "remotes" sharees returned is empty
  41. Scenario: Search only with group members - denied
  42. Given As an "test"
  43. And parameter "shareapi_only_share_with_group_members" of app "core" is set to "yes"
  44. When getting sharees for
  45. | search | sharee |
  46. | itemType | file |
  47. Then the OCS status code should be "200"
  48. And the HTTP status code should be "200"
  49. And "exact users" sharees returned is empty
  50. And "users" sharees returned is empty
  51. And "exact groups" sharees returned is empty
  52. And "groups" sharees returned are
  53. | ShareeGroup | 1 | ShareeGroup |
  54. And "exact remotes" sharees returned is empty
  55. And "remotes" sharees returned is empty
  56. Scenario: Search only with group members - allowed
  57. Given As an "test"
  58. And parameter "shareapi_only_share_with_group_members" of app "core" is set to "yes"
  59. And user "Sharee1" belongs to group "ShareeGroup"
  60. When getting sharees for
  61. | search | sharee |
  62. | itemType | file |
  63. Then the OCS status code should be "200"
  64. And the HTTP status code should be "200"
  65. And "exact users" sharees returned is empty
  66. And "users" sharees returned are
  67. | Sharee1 | 0 | Sharee1 |
  68. And "exact groups" sharees returned is empty
  69. And "groups" sharees returned are
  70. | ShareeGroup | 1 | ShareeGroup |
  71. And "exact remotes" sharees returned is empty
  72. And "remotes" sharees returned is empty
  73. Scenario: Search only with group members - no group as non-member
  74. Given As an "Sharee1"
  75. And parameter "shareapi_only_share_with_group_members" of app "core" is set to "yes"
  76. When getting sharees for
  77. | search | sharee |
  78. | itemType | file |
  79. Then the OCS status code should be "200"
  80. And the HTTP status code should be "200"
  81. And "exact users" sharees returned is empty
  82. And "users" sharees returned is empty
  83. And "exact groups" sharees returned is empty
  84. And "groups" sharees returned is empty
  85. And "exact remotes" sharees returned is empty
  86. And "remotes" sharees returned is empty
  87. Scenario: Search without exact match no iteration allowed
  88. Given As an "test"
  89. And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no"
  90. When getting sharees for
  91. | search | Sharee |
  92. | itemType | file |
  93. Then the OCS status code should be "200"
  94. And the HTTP status code should be "200"
  95. And "exact users" sharees returned is empty
  96. And "users" sharees returned is empty
  97. And "exact groups" sharees returned is empty
  98. And "groups" sharees returned is empty
  99. And "exact remotes" sharees returned is empty
  100. And "remotes" sharees returned is empty
  101. Scenario: Search with exact match no iteration allowed
  102. Given As an "test"
  103. And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no"
  104. When getting sharees for
  105. | search | Sharee1 |
  106. | itemType | file |
  107. Then the OCS status code should be "200"
  108. And the HTTP status code should be "200"
  109. And "exact users" sharees returned are
  110. | Sharee1 | 0 | Sharee1 |
  111. And "users" sharees returned is empty
  112. And "exact groups" sharees returned is empty
  113. And "groups" sharees returned is empty
  114. And "exact remotes" sharees returned is empty
  115. And "remotes" sharees returned is empty
  116. Scenario: Search with exact match group no iteration allowed
  117. Given As an "test"
  118. And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no"
  119. When getting sharees for
  120. | search | ShareeGroup |
  121. | itemType | file |
  122. Then the OCS status code should be "200"
  123. And the HTTP status code should be "200"
  124. And "exact users" sharees returned is empty
  125. And "users" sharees returned is empty
  126. And "exact groups" sharees returned are
  127. | ShareeGroup | 1 | ShareeGroup |
  128. And "groups" sharees returned is empty
  129. And "exact remotes" sharees returned is empty
  130. And "remotes" sharees returned is empty
  131. Scenario: Search with exact match
  132. Given As an "test"
  133. When getting sharees for
  134. | search | Sharee1 |
  135. | itemType | file |
  136. Then the OCS status code should be "200"
  137. And the HTTP status code should be "200"
  138. Then "exact users" sharees returned are
  139. | Sharee1 | 0 | Sharee1 |
  140. Then "users" sharees returned is empty
  141. Then "exact groups" sharees returned is empty
  142. Then "groups" sharees returned is empty
  143. Then "exact remotes" sharees returned is empty
  144. Then "remotes" sharees returned is empty
  145. Scenario: Search with exact match not-exact casing
  146. Given As an "test"
  147. When getting sharees for
  148. | search | sharee1 |
  149. | itemType | file |
  150. Then the OCS status code should be "200"
  151. And the HTTP status code should be "200"
  152. Then "exact users" sharees returned are
  153. | Sharee1 | 0 | Sharee1 |
  154. Then "users" sharees returned is empty
  155. Then "exact groups" sharees returned is empty
  156. Then "groups" sharees returned is empty
  157. Then "exact remotes" sharees returned is empty
  158. Then "remotes" sharees returned is empty
  159. Scenario: Search with exact match not-exact casing group
  160. Given As an "test"
  161. When getting sharees for
  162. | search | shareegroup |
  163. | itemType | file |
  164. Then the OCS status code should be "200"
  165. And the HTTP status code should be "200"
  166. Then "exact users" sharees returned is empty
  167. Then "users" sharees returned is empty
  168. Then "exact groups" sharees returned are
  169. | ShareeGroup | 1 | ShareeGroup |
  170. Then "groups" sharees returned is empty
  171. Then "exact remotes" sharees returned is empty
  172. Then "remotes" sharees returned is empty
  173. Scenario: Search with "self"
  174. Given As an "Sharee1"
  175. When getting sharees for
  176. | search | Sharee1 |
  177. | itemType | file |
  178. Then the OCS status code should be "200"
  179. And the HTTP status code should be "200"
  180. Then "exact users" sharees returned are
  181. | Sharee1 | 0 | Sharee1 |
  182. Then "users" sharees returned is empty
  183. Then "exact groups" sharees returned is empty
  184. Then "groups" sharees returned is empty
  185. Then "exact remotes" sharees returned is empty
  186. Then "remotes" sharees returned is empty
  187. Scenario: Remote sharee for files
  188. Given As an "test"
  189. When getting sharees for
  190. | search | test@localhost |
  191. | itemType | file |
  192. Then the OCS status code should be "200"
  193. And the HTTP status code should be "200"
  194. Then "exact users" sharees returned is empty
  195. Then "users" sharees returned is empty
  196. Then "exact groups" sharees returned is empty
  197. Then "groups" sharees returned is empty
  198. Then "exact remotes" sharees returned are
  199. | test (localhost) | 6 | test@localhost |
  200. Then "remotes" sharees returned is empty
  201. Scenario: Remote sharee for calendars not allowed
  202. Given As an "test"
  203. When getting sharees for
  204. | search | test@localhost |
  205. | itemType | calendar |
  206. Then the OCS status code should be "200"
  207. And the HTTP status code should be "200"
  208. Then "exact users" sharees returned is empty
  209. Then "users" sharees returned is empty
  210. Then "exact groups" sharees returned is empty
  211. Then "groups" sharees returned is empty
  212. Then "exact remotes" sharees returned is empty
  213. Then "remotes" sharees returned is empty
  214. Scenario: Group sharees not returned when group sharing is disabled
  215. Given As an "test"
  216. And parameter "shareapi_allow_group_sharing" of app "core" is set to "no"
  217. When getting sharees for
  218. | search | sharee |
  219. | itemType | file |
  220. Then the OCS status code should be "200"
  221. And the HTTP status code should be "200"
  222. And "exact users" sharees returned is empty
  223. And "users" sharees returned are
  224. | Sharee1 | 0 | Sharee1 |
  225. And "exact groups" sharees returned is empty
  226. And "groups" sharees returned is empty
  227. And "exact remotes" sharees returned is empty
  228. And "remotes" sharees returned is empty