-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api test for enforce password for public link
- Loading branch information
1 parent
d35f413
commit 7350bf2
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
37 changes: 37 additions & 0 deletions
37
tests/acceptance/features/apiGraph/enforcePasswordPublicLink.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,37 @@ | ||
@api @env-config | ||
Feature: enforce password on public link | ||
As a user | ||
I want to enforce passwords on public links shared with upload, edit, or contribute permission | ||
So that the password is required to make changes to the shared resources | ||
|
||
Background: | ||
Given the config "OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD" has been set to "true" | ||
And these users have been created with default attributes and without skeleton files: | ||
| username | | ||
| Alice | | ||
And user "Alice" has uploaded file with content "test file" to "/testfile.txt" | ||
|
||
|
||
Scenario: user tries to update a public link to edit permission without a password when enforce-password is enabled | ||
Given user "Alice" has created a public link share with settings | ||
| path | /testfile.txt | | ||
| permissions | 1 | | ||
When user "Alice" updates the last public link share using the sharing API with | ||
| permissions | 3 | | ||
Then the OCS status code should be "996" | ||
And the OCS status message should be "Error sending update request to public link provider: the public share needs to have a password" | ||
|
||
|
||
Scenario: user tries to update a public link to edit permission with a password when enforce-password is enabled | ||
Given user "Alice" has created a public link share with settings | ||
| path | /testfile.txt | | ||
| permissions | 1 | | ||
When user "Alice" updates the last public link share using the sharing API with | ||
| permissions | 3 | | ||
| password | 1234 | | ||
Then the OCS status code should be "100" | ||
And the OCS status message should be "OK" | ||
When the public accesses the preview of the following files from the last shared public link using the sharing API | ||
| path | | ||
| /textfile.txt | | ||
Then the HTTP status code of responses on all endpoints should be "404" |
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