sharees_provisioningapiv2.feature 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. Feature: sharees_provisioningapiv2
  2. Background:
  3. Given using api version "2"
  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 "200"
  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 "200"
  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 "200"
  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 "200"
  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 - no group as non-member
  71. Given As an "Sharee1"
  72. And parameter "shareapi_only_share_with_group_members" of app "core" is set to "yes"
  73. When getting sharees for
  74. | search | sharee |
  75. | itemType | file |
  76. Then the OCS status code should be "200"
  77. And the HTTP status code should be "200"
  78. And "exact users" sharees returned is empty
  79. And "users" sharees returned is empty
  80. And "exact groups" sharees returned is empty
  81. And "groups" sharees returned is empty
  82. And "exact remotes" sharees returned is empty
  83. And "remotes" sharees returned is empty
  84. Scenario: Search without exact match no iteration allowed
  85. Given As an "test"
  86. And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no"
  87. When getting sharees for
  88. | search | Sharee |
  89. | itemType | file |
  90. Then the OCS status code should be "200"
  91. And the HTTP status code should be "200"
  92. And "exact users" sharees returned is empty
  93. And "users" sharees returned is empty
  94. And "exact groups" sharees returned is empty
  95. And "groups" sharees returned is empty
  96. And "exact remotes" sharees returned is empty
  97. And "remotes" sharees returned is empty
  98. Scenario: Search with exact match no iteration allowed
  99. Given As an "test"
  100. And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no"
  101. When getting sharees for
  102. | search | Sharee1 |
  103. | itemType | file |
  104. Then the OCS status code should be "200"
  105. And the HTTP status code should be "200"
  106. And "exact users" sharees returned are
  107. | Sharee1 | 0 | Sharee1 |
  108. And "users" sharees returned is empty
  109. And "exact groups" sharees returned is empty
  110. And "groups" sharees returned is empty
  111. And "exact remotes" sharees returned is empty
  112. And "remotes" sharees returned is empty
  113. Scenario: Search with exact match group no iteration allowed
  114. Given As an "test"
  115. And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no"
  116. When getting sharees for
  117. | search | ShareeGroup |
  118. | itemType | file |
  119. Then the OCS status code should be "200"
  120. And the HTTP status code should be "200"
  121. And "exact users" sharees returned is empty
  122. And "users" sharees returned is empty
  123. And "exact groups" sharees returned are
  124. | ShareeGroup | 1 | ShareeGroup |
  125. And "groups" sharees returned is empty
  126. And "exact remotes" sharees returned is empty
  127. And "remotes" sharees returned is empty
  128. Scenario: Search with exact match
  129. Given As an "test"
  130. When getting sharees for
  131. | search | Sharee1 |
  132. | itemType | file |
  133. Then the OCS status code should be "200"
  134. And the HTTP status code should be "200"
  135. Then "exact users" sharees returned are
  136. | Sharee1 | 0 | Sharee1 |
  137. Then "users" sharees returned is empty
  138. Then "exact groups" sharees returned is empty
  139. Then "groups" sharees returned is empty
  140. Then "exact remotes" sharees returned is empty
  141. Then "remotes" sharees returned is empty
  142. Scenario: Search with exact match not-exact casing
  143. Given As an "test"
  144. When getting sharees for
  145. | search | sharee1 |
  146. | itemType | file |
  147. Then the OCS status code should be "200"
  148. And the HTTP status code should be "200"
  149. Then "exact users" sharees returned are
  150. | Sharee1 | 0 | Sharee1 |
  151. Then "users" sharees returned is empty
  152. Then "exact groups" sharees returned is empty
  153. Then "groups" sharees returned is empty
  154. Then "exact remotes" sharees returned is empty
  155. Then "remotes" sharees returned is empty
  156. Scenario: Search with exact match not-exact casing group
  157. Given As an "test"
  158. When getting sharees for
  159. | search | shareegroup |
  160. | itemType | file |
  161. Then the OCS status code should be "200"
  162. And the HTTP status code should be "200"
  163. Then "exact users" sharees returned is empty
  164. Then "users" sharees returned is empty
  165. Then "exact groups" sharees returned are
  166. | ShareeGroup | 1 | ShareeGroup |
  167. Then "groups" sharees returned is empty
  168. Then "exact remotes" sharees returned is empty
  169. Then "remotes" sharees returned is empty
  170. Scenario: Search with "self"
  171. Given As an "Sharee1"
  172. When getting sharees for
  173. | search | Sharee1 |
  174. | itemType | file |
  175. Then the OCS status code should be "200"
  176. And the HTTP status code should be "200"
  177. Then "exact users" sharees returned are
  178. | Sharee1 | 0 | Sharee1 |
  179. Then "users" sharees returned is empty
  180. Then "exact groups" sharees returned is empty
  181. Then "groups" sharees returned is empty
  182. Then "exact remotes" sharees returned is empty
  183. Then "remotes" sharees returned is empty
  184. Scenario: Remote sharee for files
  185. Given As an "test"
  186. When getting sharees for
  187. | search | test@localhost |
  188. | itemType | file |
  189. Then the OCS status code should be "200"
  190. And the HTTP status code should be "200"
  191. Then "exact users" sharees returned is empty
  192. Then "users" sharees returned is empty
  193. Then "exact groups" sharees returned is empty
  194. Then "groups" sharees returned is empty
  195. Then "exact remotes" sharees returned are
  196. | test@localhost | 6 | test@localhost |
  197. Then "remotes" sharees returned is empty
  198. Scenario: Remote sharee for calendars not allowed
  199. Given As an "test"
  200. When getting sharees for
  201. | search | test@localhost |
  202. | itemType | calendar |
  203. Then the OCS status code should be "200"
  204. And the HTTP status code should be "200"
  205. Then "exact users" sharees returned is empty
  206. Then "users" sharees returned is empty
  207. Then "exact groups" sharees returned is empty
  208. Then "groups" sharees returned is empty
  209. Then "exact remotes" sharees returned is empty
  210. Then "remotes" sharees returned is empty
  211. Scenario: Group sharees not returned when group sharing is disabled
  212. Given As an "test"
  213. And parameter "shareapi_allow_group_sharing" of app "core" is set to "no"
  214. When getting sharees for
  215. | search | sharee |
  216. | itemType | file |
  217. Then the OCS status code should be "200"
  218. And the HTTP status code should be "200"
  219. And "exact users" sharees returned is empty
  220. And "users" sharees returned are
  221. | Sharee1 | 0 | Sharee1 |
  222. And "exact groups" sharees returned is empty
  223. And "groups" sharees returned is empty
  224. And "exact remotes" sharees returned is empty
  225. And "remotes" sharees returned is empty