Skip to content

Commit 12f2be3

Browse files
authored
Merge pull request #11448 from owncloud/SpaceEditorWithoutTrashbin-test
[tests-only][full-ci] add test for SpaceEditorWithoutTrashbin role
2 parents 4e1c2de + c309013 commit 12f2be3

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

tests/acceptance/TestHelpers/GraphHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class GraphHelper {
4949
'Viewer With ListGrants' => 'd5041006-ebb3-4b4a-b6a4-7c180ecfb17d',
5050
'Editor With ListGrants' => 'e8ea8b21-abd4-45d2-b893-8d1546378e9e',
5151
'File Editor With ListGrants' => 'c1235aea-d106-42db-8458-7d5610fb0a67',
52+
'Space Editor Without Trashbin' => '8f4701d9-c68f-4109-a482-88e22ee32805',
5253
];
5354

5455
public const SHARING_LINK_TYPE_MAPPINGS = [
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@env-config
2+
Feature: an user shares resources
3+
As a user
4+
I don't want space editor to access deleted files
5+
So that they can't restore them
6+
7+
8+
Scenario: sharee checks trashbin after file is deleted
9+
Given these users have been created with default attributes:
10+
| username |
11+
| Alice |
12+
| Brian |
13+
And using spaces DAV path
14+
And the administrator has enabled the permissions role "Space Editor Without Trashbin"
15+
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
16+
And user "Alice" has created a space "new-space" with the default quota using the Graph API
17+
And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "textfile.txt"
18+
And user "Alice" has sent the following space share invitation:
19+
| space | new-space |
20+
| sharee | Brian |
21+
| shareType | user |
22+
| permissionsRole | Space Editor Without Trashbin |
23+
And user "Brian" has removed the file "textfile.txt" from space "new-space"
24+
When user "Brian" lists all deleted files in the trash bin of the space "new-space"
25+
Then the HTTP status code should be "403"
26+
And as "Alice" file "textfile.txt" should exist in the trashbin of the space "new-space"

0 commit comments

Comments
 (0)