Skip to content

Commit

Permalink
Merge pull request #10798 from owncloud/delete-group-share
Browse files Browse the repository at this point in the history
[tests-only][full-ci]added test to delete share access from group after the share role has been disabled
  • Loading branch information
PrajwolAmatya authored Dec 24, 2024
2 parents d9bfdda + 48b11e0 commit f632802
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,21 @@ Feature: Remove access to a drive
When user "Alice" removes the access of user "Brian" from space "new-space" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "NewSpace"

@env-config
Scenario: remove space share from group after the share role Space Editor Without Versions has been disabled
Given using spaces DAV path
And the administrator has enabled the permissions role "Space Editor Without Versions"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | group1 |
| shareType | group |
| permissionsRole | Space Editor Without Versions |
And the administrator has disabled the permissions role "Space Editor Without Versions"
When user "Alice" removes the access of group "group1" from space "new-space" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "new-space"
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,91 @@ Feature: Remove access to a drive item
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| folderToShare |

@env-config
Scenario Outline: remove share from group after the share role Secure Viewer has been disabled (Personal Space)
Given the administrator has enabled the permissions role "Secure Viewer"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has uploaded file with content "some content" to "textfile.txt"
And user "Alice" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | group1 |
| shareType | group |
| permissionsRole | Secure Viewer |
And the administrator has disabled the permissions role "Secure Viewer"
When user "Alice" removes the access of group "group1" from resource "<resource>" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| resource |
| textfile.txt |
| folderToShare |

@env-config
Scenario: remove share from group after the share role Denied has been disabled (Personal Space)
Given the administrator has enabled the permissions role "Denied"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | group1 |
| shareType | group |
| permissionsRole | Denied |
And the administrator has disabled the permissions role "Denied"
When user "Alice" removes the access of group "group1" from resource "folderToShare" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| folderToShare |

@env-config
Scenario Outline: remove share from group after the share role Secure Viewer has been disabled (Project Space)
Given using spaces DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt"
And user "Alice" has created a folder "folderToShare" in space "new-space"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | new-space |
| sharee | group1 |
| shareType | group |
| permissionsRole | Secure Viewer |
And the administrator has disabled the permissions role "Secure Viewer"
When user "Alice" removes the access of group "group1" from resource "<resource>" of space "new-space" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| resource |
| textfile.txt |
| folderToShare |

@env-config
Scenario: remove share from group after the share role Denied has been disabled (Project Space)
Given using spaces DAV path
And the administrator has enabled the permissions role "Denied"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "folderToShare" in space "new-space"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | new-space |
| sharee | group1 |
| shareType | group |
| permissionsRole | Denied |
And the administrator has disabled the permissions role "Denied"
When user "Alice" removes the access of group "group1" from resource "folderToShare" of space "new-space" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| folderToShare |

0 comments on commit f632802

Please sign in to comment.