2022-02-07 18:30:28 +01:00
|
|
|
Feature: Restoring space
|
|
|
|
|
As a manager of space
|
2023-04-17 17:05:12 +05:45
|
|
|
I want to be able to restore a disabled space
|
|
|
|
|
So that I can retrieve all the data belonging to the space
|
2022-02-07 18:30:28 +01:00
|
|
|
|
|
|
|
|
Background:
|
2024-11-29 09:39:21 +05:45
|
|
|
Given these users have been created with default attributes:
|
2022-02-07 18:30:28 +01:00
|
|
|
| username |
|
|
|
|
|
| Alice |
|
|
|
|
|
| Brian |
|
|
|
|
|
| Bob |
|
2023-06-15 15:56:48 +02:00
|
|
|
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
2022-07-08 05:18:40 +02:00
|
|
|
And user "Alice" has created a space "restore a space" of type "project" with quota "10"
|
2022-09-14 13:38:15 +05:45
|
|
|
And using spaces DAV path
|
2022-02-07 18:30:28 +01:00
|
|
|
|
|
|
|
|
|
2023-04-17 17:05:12 +05:45
|
|
|
Scenario: owner can restore a space via the Graph API
|
2022-07-08 05:18:40 +02:00
|
|
|
Given user "Alice" has disabled a space "restore a space"
|
2022-02-07 18:30:28 +01:00
|
|
|
When user "Alice" restores a disabled space "restore a space"
|
|
|
|
|
Then the HTTP status code should be "200"
|
|
|
|
|
|
|
|
|
|
|
2023-04-17 17:05:12 +05:45
|
|
|
Scenario: participants can see the data after the space is restored
|
2022-07-08 05:18:40 +02:00
|
|
|
Given user "Alice" has created a folder "mainFolder" in space "restore a space"
|
|
|
|
|
And user "Alice" has uploaded a file inside space "restore a space" with content "example" to "test.txt"
|
2024-05-13 16:15:12 +05:45
|
|
|
And user "Alice" has sent the following space share invitation:
|
|
|
|
|
| space | restore a space |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | Space Editor |
|
|
|
|
|
And user "Alice" has sent the following space share invitation:
|
|
|
|
|
| space | restore a space |
|
|
|
|
|
| sharee | Bob |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | Space Viewer |
|
2022-07-08 05:18:40 +02:00
|
|
|
And user "Alice" has disabled a space "restore a space"
|
|
|
|
|
When user "Alice" restores a disabled space "restore a space"
|
|
|
|
|
Then for user "Alice" the space "restore a space" should contain these entries:
|
|
|
|
|
| test.txt |
|
|
|
|
|
| mainFolder |
|
|
|
|
|
And for user "Brian" the space "restore a space" should contain these entries:
|
|
|
|
|
| test.txt |
|
|
|
|
|
| mainFolder |
|
|
|
|
|
And for user "Bob" the space "restore a space" should contain these entries:
|
|
|
|
|
| test.txt |
|
|
|
|
|
| mainFolder |
|
2022-02-07 18:30:28 +01:00
|
|
|
|
2022-02-10 20:21:22 +01:00
|
|
|
|
2023-03-28 09:10:21 +05:45
|
|
|
Scenario: participant can create data in the space after restoring
|
2024-05-13 16:15:12 +05:45
|
|
|
Given user "Alice" has sent the following space share invitation:
|
|
|
|
|
| space | restore a space |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | Space Editor |
|
2022-07-08 05:18:40 +02:00
|
|
|
And user "Alice" has disabled a space "restore a space"
|
|
|
|
|
And user "Alice" has restored a disabled space "restore a space"
|
|
|
|
|
When user "Brian" creates a folder "mainFolder" in space "restore a space" using the WebDav Api
|
|
|
|
|
And user "Brian" uploads a file inside space "restore a space" with content "test" to "test.txt" using the WebDAV API
|
|
|
|
|
Then for user "Brian" the space "restore a space" should contain these entries:
|
|
|
|
|
| test.txt |
|
|
|
|
|
| mainFolder |
|
2022-02-10 20:21:22 +01:00
|
|
|
|
|
|
|
|
|
2023-03-28 09:10:21 +05:45
|
|
|
Scenario Outline: user without space manager role cannot restore space
|
2024-05-13 16:15:12 +05:45
|
|
|
Given user "Alice" has sent the following space share invitation:
|
|
|
|
|
| space | restore a space |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | <space-role> |
|
2022-07-08 05:18:40 +02:00
|
|
|
And user "Alice" has disabled a space "restore a space"
|
2023-03-28 09:10:21 +05:45
|
|
|
When user "Brian" tries to restore a disabled space "restore a space" owned by user "Alice"
|
2022-02-10 20:21:22 +01:00
|
|
|
Then the HTTP status code should be "404"
|
2022-07-08 05:18:40 +02:00
|
|
|
Examples:
|
2024-05-13 16:15:12 +05:45
|
|
|
| space-role |
|
|
|
|
|
| Space Viewer |
|
|
|
|
|
| Space Editor |
|
2023-03-28 09:10:21 +05:45
|
|
|
|
|
|
|
|
|
2023-06-06 16:03:43 +02:00
|
|
|
Scenario Outline: user with role user and user light cannot restore space
|
2024-03-21 09:14:50 +05:45
|
|
|
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
|
2023-03-28 09:10:21 +05:45
|
|
|
And user "Alice" has disabled a space "restore a space"
|
|
|
|
|
When user "Brian" tries to restore a disabled space "restore a space" owned by user "Alice"
|
|
|
|
|
Then the HTTP status code should be "404"
|
|
|
|
|
Examples:
|
2024-03-21 09:14:50 +05:45
|
|
|
| user-role |
|
2023-06-06 16:03:43 +02:00
|
|
|
| User |
|
|
|
|
|
| User Light |
|
2023-03-28 09:10:21 +05:45
|
|
|
|
|
|
|
|
@issue-5872
|
|
|
|
|
Scenario Outline: admin and space admin can restore other space
|
2024-03-21 09:14:50 +05:45
|
|
|
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
|
2023-03-28 09:10:21 +05:45
|
|
|
And user "Alice" has disabled a space "restore a space"
|
|
|
|
|
When user "Brian" restores a disabled space "restore a space" owned by user "Alice"
|
|
|
|
|
Then the HTTP status code should be "200"
|
|
|
|
|
Examples:
|
2024-03-21 09:14:50 +05:45
|
|
|
| user-role |
|
2023-03-28 09:10:21 +05:45
|
|
|
| Admin |
|
|
|
|
|
| Space Admin |
|