1
0

sharing-v1-part4.feature 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  2. # SPDX-License-Identifier: AGPL-3.0-or-later
  3. Feature: sharing
  4. Background:
  5. Given using api version "1"
  6. Given using new dav path
  7. # See sharing-v1-part3.feature
  8. Scenario: Creating a new share of a file shows size and mtime
  9. Given user "user0" exists
  10. And user "user1" exists
  11. And As an "user0"
  12. And parameter "shareapi_default_permissions" of app "core" is set to "7"
  13. When creating a share with
  14. | path | welcome.txt |
  15. | shareWith | user1 |
  16. | shareType | 0 |
  17. And the OCS status code should be "100"
  18. And the HTTP status code should be "200"
  19. And Getting info of last share
  20. Then the OCS status code should be "100"
  21. And the HTTP status code should be "200"
  22. And Share fields of last share match with
  23. | item_size | A_NUMBER |
  24. | item_mtime | A_NUMBER |
  25. Scenario: Creating a new share of a file you own shows the file permissions
  26. Given user "user0" exists
  27. And user "user1" exists
  28. And As an "user0"
  29. And parameter "shareapi_default_permissions" of app "core" is set to "7"
  30. When creating a share with
  31. | path | welcome.txt |
  32. | shareWith | user1 |
  33. | shareType | 0 |
  34. And the OCS status code should be "100"
  35. And the HTTP status code should be "200"
  36. And Getting info of last share
  37. Then the OCS status code should be "100"
  38. And the HTTP status code should be "200"
  39. And Share fields of last share match with
  40. | item_permissions | 27 |