sharees.feature 9.8 KB

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