Skip to content

Commit e22c355

Browse files
Merge pull request #10759 from owncloud/delete-share
[tests-only][full-ci] added test to remove access to share after the share role has been disabled
2 parents c9de5af + 1e6455c commit e22c355

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

tests/acceptance/features/apiSharingNg1/removeAccessToDrive.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,19 @@ Feature: Remove access to a drive
246246
When user "Alice" removes the last link share of space "projectSpace" using permissions endpoint of the Graph API
247247
Then the HTTP status code should be "204"
248248
And user "Alice" should not have any "link" permissions on space "projectSpace"
249+
250+
@env-config
251+
Scenario: remove space share after the share role Space Editor Without Versions has been disabled
252+
Given using spaces DAV path
253+
And the administrator has enabled the permissions role "Space Editor Without Versions"
254+
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
255+
And user "Alice" has created a space "new-space" with the default quota using the Graph API
256+
And user "Alice" has sent the following space share invitation:
257+
| space | new-space |
258+
| sharee | Brian |
259+
| shareType | user |
260+
| permissionsRole | Space Editor Without Versions |
261+
And the administrator has disabled the permissions role "Space Editor Without Versions"
262+
When user "Alice" removes the access of user "Brian" from space "new-space" using root endpoint of the Graph API
263+
Then the HTTP status code should be "204"
264+
And the user "Brian" should not have a space called "NewSpace"

tests/acceptance/features/apiSharingNg1/removeAccessToDriveItem.feature

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,83 @@ Feature: Remove access to a drive item
143143
| Space Viewer |
144144
| Space Editor |
145145
| Manager |
146+
147+
@env-config
148+
Scenario Outline: remove share after the share role Secure Viewer has been disabled (Personal Space)
149+
Given the administrator has enabled the permissions role "Secure Viewer"
150+
And user "Alice" has uploaded file with content "some content" to "textfile.txt"
151+
And user "Alice" has created folder "folderToShare"
152+
And user "Alice" has sent the following resource share invitation:
153+
| resource | <resource> |
154+
| space | Personal |
155+
| sharee | Brian |
156+
| shareType | user |
157+
| permissionsRole | Secure Viewer |
158+
And the administrator has disabled the permissions role "Secure Viewer"
159+
When user "Alice" removes the access of user "Brian" from resource "<resource>" of space "Personal" using the Graph API
160+
Then the HTTP status code should be "204"
161+
And for user "Brian" the space "Shares" should not contain these entries:
162+
| <resource> |
163+
Examples:
164+
| resource |
165+
| textfile.txt |
166+
| folderToShare |
167+
168+
@env-config
169+
Scenario: remove share after the share role Denied has been disabled (Personal Space)
170+
Given the administrator has enabled the permissions role "Denied"
171+
And user "Alice" has created folder "folderToShare"
172+
And user "Alice" has sent the following resource share invitation:
173+
| resource | folderToShare |
174+
| space | Personal |
175+
| sharee | Brian |
176+
| shareType | user |
177+
| permissionsRole | Denied |
178+
And the administrator has disabled the permissions role "Denied"
179+
When user "Alice" removes the access of user "Brian" from resource "folderToShare" of space "Personal" using the Graph API
180+
Then the HTTP status code should be "204"
181+
And for user "Brian" the space "Shares" should not contain these entries:
182+
| folderToShare |
183+
184+
@env-config
185+
Scenario Outline: remove share after the share role Secure Viewer has been disabled (Project Space)
186+
Given using spaces DAV path
187+
And the administrator has enabled the permissions role "Secure Viewer"
188+
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
189+
And user "Alice" has created a space "new-space" with the default quota using the Graph API
190+
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt"
191+
And user "Alice" has created a folder "folderToShare" in space "new-space"
192+
And user "Alice" has sent the following resource share invitation:
193+
| resource | <resource> |
194+
| space | new-space |
195+
| sharee | Brian |
196+
| shareType | user |
197+
| permissionsRole | Secure Viewer |
198+
And the administrator has disabled the permissions role "Secure Viewer"
199+
When user "Alice" removes the access of user "Brian" from resource "<resource>" of space "new-space" using the Graph API
200+
Then the HTTP status code should be "204"
201+
And for user "Brian" the space "Shares" should not contain these entries:
202+
| <resource> |
203+
Examples:
204+
| resource |
205+
| textfile.txt |
206+
| folderToShare |
207+
208+
@env-config
209+
Scenario: remove share after the share role Denied has been disabled (Project Space)
210+
Given using spaces DAV path
211+
And the administrator has enabled the permissions role "Denied"
212+
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
213+
And user "Alice" has created a space "new-space" with the default quota using the Graph API
214+
And user "Alice" has created a folder "folderToShare" in space "new-space"
215+
And user "Alice" has sent the following resource share invitation:
216+
| resource | folderToShare |
217+
| space | new-space |
218+
| sharee | Brian |
219+
| shareType | user |
220+
| permissionsRole | Denied |
221+
And the administrator has disabled the permissions role "Denied"
222+
When user "Alice" removes the access of user "Brian" from resource "folderToShare" of space "new-space" using the Graph API
223+
Then the HTTP status code should be "204"
224+
And for user "Brian" the space "Shares" should not contain these entries:
225+
| folderToShare |

0 commit comments

Comments
 (0)