diff --git a/tests/acceptance/features/apiSpacesShares/shareSpaces.feature b/tests/acceptance/features/apiSpacesShares/shareSpaces.feature index e95c97f2ee..e26dacf823 100644 --- a/tests/acceptance/features/apiSpacesShares/shareSpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/shareSpaces.feature @@ -87,3 +87,17 @@ Feature: Share spaces 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 | + + + 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 "" + 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" + And the user "Brian" should not have a space called "share space" + Examples: + | role | + | manager | + | editor | + | viewer | diff --git a/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature b/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature index 49b7d2cbb9..0160617a7c 100644 --- a/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature +++ b/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature @@ -91,3 +91,13 @@ Feature: Share spaces via link Then the HTTP status code should be "200" And the OCS status code should be "200" And for user "Alice" the space "share space" should contain the last created public link + + + Scenario: A user cannot share a disabled space to public via link + Given user "Alice" has disabled a space "share space" + When user "Alice" creates a public link share of the space "share space" with settings: + | permissions | 1 | + 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" + And for user "Alice" the space "share space" should not contain the last created public link