[test-only][full-ci] ApiTest. share space with expiration date (#5562)

This commit is contained in:
Viktor Scharf
2023-02-17 14:03:53 +05:45
committed by GitHub
parent 3e3d3f9de2
commit 1730538836
18 changed files with 401 additions and 176 deletions
@@ -17,7 +17,9 @@ Feature: copy file
And user "Alice" has created a space "Project" with the default quota using the GraphApi
And user "Alice" has created a folder "/newfolder" in space "Project"
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "/insideSpace.txt"
And user "Alice" has shared a space "Project" to user "Brian" with role "<role>"
And user "Alice" has shared a space "Project" with settings:
| shareWith | Brian |
| role | <role> |
When user "Brian" copies file "/insideSpace.txt" to "/newfolder/insideSpace.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Brian" the space "Project" should contain these entries:
@@ -34,7 +36,9 @@ Feature: copy file
And user "Alice" has created a space "Project" with the default quota using the GraphApi
And user "Alice" has created a folder "/newfolder" in space "Project"
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt"
And user "Alice" has shared a space "Project" to user "Brian" with role "viewer"
And user "Alice" has shared a space "Project" with settings:
| shareWith | Brian |
| role | viewer |
When user "Brian" copies file "/insideSpace.txt" to "/newfolder/insideSpace.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Brian" the space "Project" should not contain these entries:
@@ -46,8 +50,12 @@ Feature: copy file
And user "Brian" has created a space "Project1" with the default quota using the GraphApi
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project1" with content "Project1 content" to "/project1.txt"
And user "Brian" has shared a space "Project2" to user "Alice" with role "<to_role>"
And user "Brian" has shared a space "Project1" to user "Alice" with role "<from_role>"
And user "Brian" has shared a space "Project2" with settings:
| shareWith | Alice |
| role | <to_role> |
And user "Brian" has shared a space "Project1" with settings:
| shareWith | Alice |
| role | <from_role> |
When user "Alice" copies file "/project1.txt" from space "Project1" to "/project1.txt" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project2" should contain these entries:
@@ -66,8 +74,12 @@ Feature: copy file
And user "Brian" has created a space "Project1" with the default quota using the GraphApi
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project1" with content "Project1 content" to "/project1.txt"
And user "Brian" has shared a space "Project2" to user "Alice" with role "viewer"
And user "Brian" has shared a space "Project1" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project2" with settings:
| shareWith | Alice |
| role | viewer |
And user "Brian" has shared a space "Project1" with settings:
| shareWith | Alice |
| role | <role> |
When user "Alice" copies file "/project1.txt" from space "Project1" to "/project1.txt" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project2" should not contain these entries:
@@ -82,7 +94,9 @@ Feature: copy file
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "/project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
When user "Alice" copies file "/project.txt" from space "Project" to "/project.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
@@ -100,7 +114,9 @@ Feature: copy file
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "/project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "31"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares" using the WebDAV API
@@ -120,7 +136,9 @@ Feature: copy file
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "/project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "17"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares" using the WebDAV API
@@ -137,7 +155,9 @@ Feature: copy file
Scenario Outline: User copies a file from space personal to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Alice" has uploaded file with content "personal space content" to "/personal.txt"
When user "Alice" copies file "/personal.txt" from space "Personal" to "/personal.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
@@ -153,7 +173,9 @@ Feature: copy file
Scenario: User copies a file from space personal to space project with role viewer
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | viewer |
And user "Alice" has uploaded file with content "personal space content" to "/personal.txt"
When user "Alice" copies file "/personal.txt" from space "Personal" to "/personal.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
@@ -204,7 +226,9 @@ Feature: copy file
Scenario Outline: User copies a file from space Shares with different role to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
@@ -225,7 +249,9 @@ Feature: copy file
Scenario Outline: User copies a file from space Shares with different role to space project with role viewer
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | viewer |
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
@@ -288,7 +314,9 @@ Feature: copy file
And user "Alice" has created a folder "/folder1" in space "Project"
And user "Alice" has created a folder "/folder2" in space "Project"
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "/folder2/demo.txt"
And user "Alice" has shared a space "Project" to user "Brian" with role "<role>"
And user "Alice" has shared a space "Project" with settings:
| shareWith | Brian |
| role | <role> |
When user "Brian" copies folder "/folder2" to "/folder1/folder2" inside space "Project" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Brian" the space "Project" <shouldOrNot> contain these entries:
@@ -306,8 +334,12 @@ Feature: copy file
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
And user "Brian" has created a folder "/folder1" in space "Project1"
And user "Brian" has uploaded a file inside space "Project1" with content "some content" to "/folder1/demo.txt"
And user "Brian" has shared a space "Project2" to user "Alice" with role "<to_role>"
And user "Brian" has shared a space "Project1" to user "Alice" with role "<from_role>"
And user "Brian" has shared a space "Project2" with settings:
| shareWith | Alice |
| role | <to_role> |
And user "Brian" has shared a space "Project1" with settings:
| shareWith | Alice |
| role | <from_role> |
When user "Alice" copies folder "/folder1" from space "Project1" to "/folder1" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" the space "Project2" <shouldOrNot> contain these entries:
@@ -328,7 +360,9 @@ Feature: copy file
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created a folder "/folder1" in space "Project"
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "/folder1/demo.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
When user "Alice" copies file "/folder1" from space "Project" to "/folder1" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
@@ -346,7 +380,9 @@ Feature: copy file
And user "Brian" has created folder "/testshare"
And user "Brian" has created a folder "/folder1" in space "Project"
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "/folder1/demo.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies folder "/folder1" from space "Project" to "/testshare/folder1" inside space "Shares" using the WebDAV API
@@ -366,7 +402,9 @@ Feature: copy file
Scenario Outline: User copies a folder from space personal to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Alice" has created folder "/folder1"
And user "Alice" has uploaded file with content "some content" to "folder1/demo.txt"
When user "Alice" copies folder "/folder1" from space "Personal" to "/folder1" inside space "Project" using the WebDAV API
@@ -416,7 +454,9 @@ Feature: copy file
Scenario Outline: User copies a folder from space Shares with different role to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Brian" has created folder "/testshare"
And user "Brian" has created folder "/testshare/folder1"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/folder1/testshare.txt"
@@ -437,7 +477,9 @@ Feature: copy file
Scenario Outline: User copies a folder from space Shares with different role to space project with role viewer
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | viewer |
And user "Brian" has created folder "/testshare"
And user "Brian" has created folder "/testshare/folder1"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/folder1/testshare.txt"
@@ -17,7 +17,9 @@ Feature: move (rename) file
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created a folder "newfolder" in space "Project"
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
When user "Alice" moves file "insideSpace.txt" to "newfolder/insideSpace.txt" in space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
@@ -35,7 +37,9 @@ Feature: move (rename) file
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created a folder "newfolder" in space "Project"
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | viewer |
When user "Alice" moves file "insideSpace.txt" to "newfolder/insideSpace.txt" in space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project" should not contain these entries:
@@ -49,8 +53,12 @@ Feature: move (rename) file
And user "Brian" has created a space "Project1" with the default quota using the GraphApi
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project1" with content "Project1 content" to "project1.txt"
And user "Brian" has shared a space "Project2" to user "Alice" with role "<to_role>"
And user "Brian" has shared a space "Project1" to user "Alice" with role "<from_role>"
And user "Brian" has shared a space "Project2" with settings:
| shareWith | Alice |
| role | <to_role> |
And user "Brian" has shared a space "Project1" with settings:
| shareWith | Alice |
| role | <from_role> |
When user "Alice" moves file "project1.txt" from space "Project1" to "project1.txt" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "<https_status_code>"
And for user "Alice" the space "Project1" should contain these entries:
@@ -74,7 +82,9 @@ Feature: move (rename) file
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
When user "Alice" moves file "project.txt" from space "Project" to "project.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "<https_status_code>"
And for user "Alice" the space "Project" should contain these entries:
@@ -93,7 +103,9 @@ Feature: move (rename) file
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" moves file "project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares" using the WebDAV API
@@ -115,7 +127,9 @@ Feature: move (rename) file
Scenario Outline: User moves a file from space personal to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Alice" has uploaded file with content "personal space content" to "/personal.txt"
When user "Alice" moves file "personal.txt" from space "Personal" to "personal.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "<https_status_code>"
@@ -169,7 +183,9 @@ Feature: move (rename) file
Scenario Outline: User moves a file from space Shares with different role (permissions) to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared a space "Project" with settings:
| shareWith | Alice |
| role | <role> |
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
@@ -18,7 +18,9 @@ Feature: Share spaces
Scenario Outline: A Space Admin can share a space to another user
When user "Alice" shares a space "share space" to user "Brian" with role "<role>"
When user "Alice" shares a space "share space" with settings:
| shareWith | Brian |
| role | <role> |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
@@ -35,29 +37,38 @@ Feature: Share spaces
Scenario: A user can see who has been granted access
When user "Alice" shares a space "share space" to user "Brian" with role "viewer"
When user "Alice" shares a space "share space" with settings:
| shareWith | Brian |
| role | viewer |
Then the user "Alice" should have a space called "share space" granted to user "Brian" with role "viewer"
Scenario: A user can see that the group has been granted access
Given group "sales" has been created
When user "Alice" shares a space "share space" to group "sales" with role "viewer"
When user "Alice" shares a space "share space" with settings:
| shareWith | sales |
| shareType | 8 |
| role | viewer |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the user "Alice" should have a space called "share space" granted to group "sales" with role "viewer"
Scenario: A user can see a file in a received shared space
Given user "Alice" has uploaded a file inside space "share space" with content "Test" to "test.txt"
And user "Alice" has created a folder "Folder Main" in space "share space"
When user "Alice" shares a space "share space" to user "Brian" with role "viewer"
When user "Alice" shares a space "share space" with settings:
| shareWith | Brian |
| role | viewer |
Then for user "Brian" the space "share space" should contain these entries:
| test.txt |
| Folder Main |
Scenario: When a user unshares a space, the space becomes unavailable to the receiver
Given user "Alice" has shared a space "share space" to user "Brian" with role "viewer"
Given user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | viewer |
And the user "Brian" should have a space called "share space" with these key and value pairs:
| key | value |
| driveType | project |
@@ -69,7 +80,9 @@ Feature: Share spaces
Scenario Outline: Owner of a space cannot see the space after removing his access to the space
Given user "Alice" has shared a space "share space" to user "Brian" with role "manager"
Given user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | manager |
When user "<user>" unshares a space "share space" to user "Alice"
Then the HTTP status code should be "200"
And the user "Brian" should have a space called "share space" owned by "Alice" with these key and value pairs:
@@ -86,9 +99,13 @@ Feature: Share spaces
Scenario: A user can add another user to the space managers to enable him
Given user "Alice" has uploaded a file inside space "share space" with content "Test" to "test.txt"
When user "Alice" shares a space "share space" to user "Brian" with role "manager"
When user "Alice" shares a space "share space" with settings:
| shareWith | Brian |
| role | manager |
Then the user "Brian" should have a space called "share space" granted to "Brian" with role "manager"
When user "Brian" shares a space "share space" to user "Bob" with role "viewer"
When user "Brian" shares a space "share space" with settings:
| shareWith | Bob |
| role | viewer |
Then the user "Bob" should have a space called "share space" granted to "Bob" with role "viewer"
And for user "Bob" the space "share space" should contain these entries:
| test.txt |
@@ -96,7 +113,9 @@ Feature: Share spaces
Scenario Outline: A user cannot share a disabled space to another user
Given user "Alice" has disabled a space "share space"
When user "Alice" shares a space "share space" to user "Brian" with role "<role>"
When user "Alice" shares a space "share space" with settings:
| shareWith | Brian |
| role | <role> |
Then the HTTP status code should be "404"
And the OCS status code should be "404"
And the OCS status message should be "Wrong path, file/folder doesn't exist"
@@ -109,8 +128,12 @@ Feature: Share spaces
Scenario Outline: A user with manager role can share a space to another user
Given user "Alice" has shared a space "share space" to user "Brian" with role "manager"
When user "Brian" shares a space "share space" to user "Bob" with role "<role>"
Given user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | manager |
When user "Brian" shares a space "share space" with settings:
| shareWith | Bob |
| role | <role> |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
@@ -127,8 +150,12 @@ Feature: Share spaces
Scenario Outline: A user with editor or viewer role cannot share a space to another user
Given user "Alice" has shared a space "share space" to user "Brian" with role "<role>"
When user "Brian" shares a space "share space" to user "Bob" with role "<new_role>"
Given user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | <role> |
When user "Brian" shares a space "share space" with settings:
| shareWith | Bob |
| role | <new_role> |
Then the HTTP status code should be "404"
And the OCS status code should be "404"
And the OCS status message should be "No share permission"
@@ -144,8 +171,12 @@ Feature: Share spaces
Scenario Outline: space manager can change the role of space members
Given user "Alice" has shared a space "share space" to user "Brian" with role "<role>"
When user "Alice" updates the space "share space" for user "Brian" changing the role to "<new_role>"
Given user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | <role> |
When user "Alice" shares a space "share space" with settings:
| shareWith | Brian |
| role | <new_role> |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the user "Alice" should have a space called "share space" granted to "Brian" with role "<new_role>"
@@ -160,9 +191,15 @@ Feature: Share spaces
Scenario Outline: user without manager role cannot change the role of space members
Given user "Alice" has shared a space "share space" to user "Brian" with role "<role>"
And user "Alice" has shared a space "share space" to user "Bob" with role "viewer"
When user "Brian" updates the space "share space" for user "Bob" changing the role to "<new_role>"
Given user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | <role> |
And user "Alice" has shared a space "share space" with settings:
| shareWith | Bob |
| role | viewer |
When user "Brian" updates the space "share space" with settings:
| shareWith | Bob |
| role | <new_role> |
Then the HTTP status code should be "404"
And the OCS status code should be "404"
And the user "Alice" should have a space called "share space" granted to "Bob" with role "viewer"
@@ -178,7 +215,10 @@ Feature: Share spaces
Given group "group2" has been created
And the administrator has added a user "Brian" to the group "group2" using GraphApi
And the administrator has added a user "Bob" to the group "group2" using GraphApi
When user "Alice" shares a space "share space" to group "group2" with role "<role>"
When user "Alice" shares a space "share space" with settings:
| shareWith | group2 |
| shareType | 8 |
| role | <role> |
Then the HTTP status code should be "200"
And the user "Brian" should have a space called "share space" with these key and value pairs:
| key | value |
@@ -198,7 +238,10 @@ Feature: Share spaces
Scenario Outline: The user has no access to the space if access for the group has been removed
Given group "group2" has been created
And the administrator has added a user "Brian" to the group "group2" using GraphApi
And user "Alice" has shared a space "share space" to group "group2" with role "<role>"
And user "Alice" has shared a space "share space" with settings:
| shareWith | group2 |
| shareType | 8 |
| role | <role> |
When user "Alice" unshares a space "share space" to group "group2"
Then the HTTP status code should be "200"
And the user "Brian" should not have a space called "share space"
@@ -213,7 +256,10 @@ Feature: Share spaces
Given group "group2" has been created
And the administrator has added a user "Brian" to the group "group2" using GraphApi
And the administrator has added a user "Bob" to the group "group2" using GraphApi
And user "Alice" has shared a space "share space" to group "group2" with role "editor"
And user "Alice" has shared a space "share space" with settings:
| shareWith | group2 |
| shareType | 8 |
| role | editor |
When the administrator removes the following users from the following groups using the Graph API
| username | groupname |
| Brian | group2 |
@@ -229,24 +275,76 @@ Feature: Share spaces
Given group "group2" has been created
And the administrator has added a user "Brian" to the group "group2" using GraphApi
And the administrator has added a user "Bob" to the group "group2" using GraphApi
And user "Alice" has shared a space "share space" to group "group2" with role "editor"
And user "Alice" has shared a space "share space" with settings:
| shareWith | group2 |
| shareType | 8 |
| role | editor |
When the administrator deletes group "group2" using the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "share space"
And the user "Bob" should not have a space called "share space"
Scenario Outline: User increases permissions for one member of the group or for the entire group
Scenario: User increases permissions for one member of the group or for the entire group
Given group "sales" has been created
And the administrator has added a user "Brian" to the group "sales" using GraphApi
And user "Alice" has shared a space "share space" to <firstRecipient> with role "viewer"
And user "Alice" has shared a space "share space" with settings:
| shareWith | sales |
| shareType | 8 |
| role | viewer |
When user "Brian" uploads a file inside space "share space" with content "Test" to "test.txt" using the WebDAV API
Then the HTTP status code should be "403"
When user "Alice" shares a space "share space" to <secondRecipient> with role "editor"
When user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | editor |
Then the HTTP status code should be "200"
When user "Brian" uploads a file inside space "share space" with content "Test" to "test.txt" using the WebDAV API
Then the HTTP status code should be "201"
Scenario: User increases permissions for the group, so the user's permissions are increased
Given group "sales" has been created
And the administrator has added a user "Brian" to the group "sales" using GraphApi
And user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | viewer |
When user "Brian" uploads a file inside space "share space" with content "Test" to "test.txt" using the WebDAV API
Then the HTTP status code should be "403"
When user "Alice" has shared a space "share space" with settings:
| shareWith | sales |
| shareType | 8 |
| role | editor |
Then the HTTP status code should be "200"
When user "Brian" uploads a file inside space "share space" with content "Test" to "test.txt" using the WebDAV API
Then the HTTP status code should be "201"
Scenario Outline: A Space Admin can share a space to the user with an expiration date
When user "Alice" shares a space "share space" with settings:
| shareWith | Brian |
| role | <role> |
| expireDate | 2042-03-25T23:59:59+0100 |
Then the HTTP status code should be "200"
And the user "Brian" should have a space called "share space" granted to user "Brian" with role "<role>" and expiration date "2042-03-25"
Examples:
| firstRecipient | secondRecipient |
| group "sales" | user "Brian" |
| user "Brian" | group "sales" |
| role |
| manager |
| editor |
| viewer |
Scenario Outline: A Space Admin can share a space to the group with an expiration date
Given group "sales" has been created
And the administrator has added a user "Brian" to the group "sales" using GraphApi
When user "Alice" shares a space "share space" with settings:
| shareWith | sales |
| shareType | 8 |
| role | <role> |
| expireDate | 2042-03-25T23:59:59+0100 |
Then the HTTP status code should be "200"
And the user "Brian" should have a space called "share space" granted to group "sales" with role "<role>" and expiration date "2042-03-25"
Examples:
| role |
| manager |
| editor |
| viewer |
@@ -71,7 +71,9 @@ Feature: Share spaces via link
Scenario Outline: An user without manager role cannot share a space to public via link
Given user "Alice" has shared a space "share space" to user "Brian" with role "<role>"
Given user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | <role> |
When user "Brian" creates a public link share of the space "share space" with settings:
| permissions | 1 |
Then the HTTP status code should be "404"
@@ -85,7 +87,9 @@ Feature: Share spaces via link
Scenario: An user with manager role can share a space to public via link
Given user "Alice" has shared a space "share space" to user "Brian" with role "manager"
Given user "Alice" has shared a space "share space" with settings:
| shareWith | Brian |
| role | manager |
When user "Brian" creates a public link share of the space "share space" with settings:
| permissions | 1 |
Then the HTTP status code should be "200"
@@ -43,7 +43,9 @@ Feature: Share a file or folder that is inside a space
Scenario Outline: A user participant of the project space with manager role can share an entity to another user
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "manager"
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | manager |
When user "Brian" creates a share inside of space "share sub-item" with settings:
| path | <entity> |
| shareWith | Bob |
@@ -65,7 +67,9 @@ Feature: Share a file or folder that is inside a space
Scenario Outline: A user participant of the project space without space manager role cannot share an entity to another user
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "<spaceRole>"
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | <spaceRole> |
When user "Brian" creates a share inside of space "share sub-item" with settings:
| path | <entity> |
| shareWith | Bob |
@@ -82,7 +86,9 @@ Feature: Share a file or folder that is inside a space
Scenario Outline: A user participant of the project space can see the created resources share
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "<spaceRole>"
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | <spaceRole> |
When user "Alice" creates a share inside of space "share sub-item" with settings:
| path | file.txt |
| shareWith | Bob |
@@ -1,21 +1,21 @@
@api @skipOnOcV10
Feature: Share a file or folder that is inside a space via public link
As an user with manager space role
I want to be able to share the data inside the space via public link
As an user with manager space role
I want to be able to share the data inside the space via public link
folder permissions:
| role | permissions |
| internal | 0 |
| viewer | 1 |
| uploader | 4 |
| contributor | 5 |
| editor | 15 |
folder permissions:
| role | permissions |
| internal | 0 |
| viewer | 1 |
| uploader | 4 |
| contributor | 5 |
| editor | 15 |
file permissions:
| role | permissions |
| internal | 0 |
| viewer | 1 |
| editor | 3 |
file permissions:
| role | permissions |
| internal | 0 |
| viewer | 1 |
| editor | 3 |
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839
@@ -65,7 +65,9 @@ Feature: Share a file or folder that is inside a space via public link
Scenario Outline: An user participant of the project space with space manager role can share an entity inside project space via public link
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "manager"
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | manager |
When user "Brian" creates a public link share inside of space "share sub-item" with settings:
| path | <entity> |
| shareType | 3 |
@@ -91,7 +93,9 @@ Feature: Share a file or folder that is inside a space via public link
Scenario Outline: An user participant of the project space without space manager role cannot share an entity inside project space via public link
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "<spaceRole>"
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | <spaceRole> |
When user "Brian" creates a public link share inside of space "share sub-item" with settings:
| path | <entity> |
| shareType | 3 |
@@ -138,7 +142,9 @@ Feature: Share a file or folder that is inside a space via public link
Scenario Outline: An user participant of the project space can see the created public resources link
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "<spaceRole>"
Given user "Alice" has shared a space "share sub-item" with settings:
| shareWith | Brian |
| role | <spaceRole> |
When user "Alice" creates a public link share inside of space "share sub-item" with settings:
| path | folder/file.txt |
| shareType | 3 |