-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
031fded
commit 6fad514
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
tests/acceptance/features/apiSharing-v1/disableSharing.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
@api | ||
Feature: sharing | ||
As an admin | ||
I want to be able to disable sharing functionality | ||
So that ownCloud users cannot share file or folder | ||
|
||
Background: | ||
Given using API version "1" | ||
And using old DAV path | ||
|
||
Scenario: user tries to share a file with another user when the sharing api has been disabled | ||
Given as user "admin" | ||
And user "user0" has been created | ||
And user "user1" has been created | ||
And as user "admin" | ||
When parameter "shareapi_enabled" of app "core" has been set to "no" | ||
Then user "user0" should not be able to share file "welcome.txt" with user "user1" using the API | ||
And the OCS status code should be "404" | ||
And the HTTP status code should be "200" | ||
|
||
Scenario: user tries to share a folder with another user when the sharing api has been disabled | ||
Given as user "admin" | ||
And user "user0" has been created | ||
And user "user1" has been created | ||
And as user "admin" | ||
When parameter "shareapi_enabled" of app "core" has been set to "no" | ||
Then user "user0" should not be able to share folder "/FOLDER" with user "user1" using the API | ||
And the OCS status code should be "404" | ||
And the HTTP status code should be "200" | ||
|
||
Scenario: user tries to share a file with group when the sharing api has been disabled | ||
Given as user "admin" | ||
And user "user0" has been created | ||
And user "user1" has been created | ||
And group "sharinggroup" has been created | ||
And user "user1" has been added to group "sharinggroup" | ||
And as user "admin" | ||
When parameter "shareapi_enabled" of app "core" has been set to "no" | ||
Then user "user0" should not be able to share file "welcome.txt" with group "sharinggroup" using the API | ||
And the OCS status code should be "404" | ||
And the HTTP status code should be "200" | ||
|
||
Scenario: user tries to share a folder with group when the sharing api has been disabled | ||
Given as user "admin" | ||
And user "user0" has been created | ||
And user "user1" has been created | ||
And group "sharinggroup" has been created | ||
And user "user1" has been added to group "sharinggroup" | ||
And as user "admin" | ||
When parameter "shareapi_enabled" of app "core" has been set to "no" | ||
Then user "user0" should not be able to share folder "/FOLDER" with group "sharinggroup" using the API | ||
And the OCS status code should be "404" | ||
And the HTTP status code should be "200" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters