-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #384 from owncloud/validate-guests-emails
Use rawurldecode for allowing "+" in guests emails
- Loading branch information
Showing
4 changed files
with
55 additions
and
27 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
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 |
---|---|---|
|
@@ -5,10 +5,17 @@ Feature: Guests | |
Given using OCS API version "1" | ||
And using new dav path | ||
|
||
Scenario: Creating a guest user works fine | ||
When the administrator creates guest user "guest" with email "[email protected]" using the API | ||
@skipOnOcV10.3 | ||
Scenario Outline: Creating a guest user works fine | ||
When the administrator creates guest user "<user>" with email "<email-address>" using the API | ||
Then the HTTP status code should be "201" | ||
And user "guest" should be a guest user | ||
And user "<user>" should be a guest user | ||
And the email address of user "<email-address>" should be "<email-address>" | ||
Examples: | ||
| email-address | user | | ||
| guest@example.com | guest | | ||
| john.smith@email.com | john.smith | | ||
| betty_anne+bob-burns@email.com | betty_anne+bob-burns | | ||
|
||
Scenario: Cannot create a guest if a user with the same email address exists | ||
Given user "existing-user" has been created with default attributes and skeleton files | ||
|
@@ -36,16 +43,22 @@ Feature: Guests | |
And as "[email protected]" file "/textfile.txt" should not exist | ||
And as "user0" file "/textfile.txt" should not exist | ||
|
||
@mailhog | ||
Scenario: A guest user can upload files to a folder shared with them | ||
@mailhog @skipOnOcV10.3 | ||
Scenario Outline: A guest user can upload files to a folder shared with them | ||
Given user "user0" has been created with default attributes and skeleton files | ||
And the administrator has created guest user "guest" with email "[email protected]" | ||
And the administrator has created guest user "<user>" with email "<email-address>" | ||
And the HTTP status code should be "201" | ||
And user "user0" has created folder "/tmp" | ||
And user "user0" has shared folder "/tmp" with user "[email protected]" | ||
And guest user "guest" has registered | ||
When user "[email protected]" uploads file "textfile.txt" from the guests test data folder to "/tmp/textfile.txt" using the WebDAV API | ||
And user "user0" has shared folder "/tmp" with user "<email-address>" | ||
And guest user "<user>" has registered | ||
When user "<email-address>" uploads file "textfile.txt" from the guests test data folder to "/tmp/textfile.txt" using the WebDAV API | ||
Then the HTTP status code should be "201" | ||
And as "user0" file "/tmp/textfile.txt" should exist | ||
Examples: | ||
| email-address | user | | ||
| guest@example.com | guest | | ||
| john.smith@email.com | john.smith | | ||
| betty_anne+bob-burns@email.com | betty_anne+bob-burns | | ||
|
||
@mailhog | ||
Scenario: A guest user can upload chunked files to a folder shared with them | ||
|
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
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 |
---|---|---|
|
@@ -27,12 +27,17 @@ Feature: Guests | |
Then the user should be redirected to a webUI page with the title "%productname%" | ||
And a warning should be displayed on the set-password-page saying "The token is invalid" | ||
|
||
@mailhog @skipOnOcV10.2 | ||
Scenario: User uses valid email to create a guest user | ||
@mailhog @skipOnOcV10.2 @skipOnOcV10.3 | ||
Scenario Outline: User uses valid email to create a guest user | ||
Given user "user0" has been created with default attributes and skeleton files | ||
And user "user0" has logged in using the webUI | ||
When the user shares file "data.zip" with guest user with email "[email protected]" using the webUI | ||
Then user "[email protected]" should exist | ||
When the user shares file "data.zip" with guest user with email "<email-address>" using the webUI | ||
Then user "<email-address>" should exist | ||
Examples: | ||
| email-address | | ||
| valid@email.com | | ||
| John.Smith@email.com | | ||
| Betty_Anne+Bob-Burns@email.com | | ||
|
||
@mailhog | ||
Scenario: User uses some random string email to create a guest user | ||
|
@@ -78,15 +83,15 @@ Feature: Guests | |
And user "[email protected]" should exist | ||
# And user "[email protected]" should not exist | ||
|
||
@mailhog @issue-332 @skipOnOcV10.2 @skipOnFIREFOX | ||
@mailhog @skipOnOcV10.2 @skipOnFIREFOX | ||
Scenario: Administrator changes the guest user's password in users menu | ||
Given user "admin" has uploaded file with content "new content" to "new-file.txt" | ||
And the administrator has logged in using the webUI | ||
And the user shares file "new-file.txt" with guest user with email "[email protected]" using the webUI | ||
And the administrator has browsed to the users page | ||
When the administrator changes the password of user "[email protected]" to "newpassword" using the webUI | ||
#Then notifications should be displayed on the webUI with the text | ||
# | Password successfully changed | | ||
Then notifications should be displayed on the webUI with the text | ||
| Password successfully changed | | ||
When the administrator logs out of the webUI | ||
And the user logs in with username "[email protected]" and password "newpassword" using the webUI | ||
Then the user should be redirected to a webUI page with the title "Files - %productname%" | ||
|
@@ -139,17 +144,23 @@ Feature: Guests | |
And user "[email protected]" logs in using the webUI | ||
Then the user should not have permission to upload or create files | ||
|
||
@mailhog | ||
Scenario: Guest user is able to upload or create files inside the received share(with change permission) | ||
@mailhog @skipOnOcV10.3 | ||
Scenario Outline: Guest user is able to upload or create files inside the received share(with change permission) | ||
Given user "user0" has been created with default attributes and skeleton files | ||
And user "user0" has logged in using the webUI | ||
When the user shares folder "simple-folder" with guest user with email "[email protected]" using the webUI | ||
When the user shares folder "simple-folder" with guest user with email "<email-address>" using the webUI | ||
And the user logs out of the webUI | ||
And guest user "[email protected]" registers with email "[email protected]" and sets password to "password" using the webUI | ||
And user "[email protected]" logs in using the webUI | ||
And guest user "<email-address>" registers with email "<email-address>" and sets password to "password" using the webUI | ||
And user "<email-address>" logs in using the webUI | ||
And the user opens folder "simple-folder" using the webUI | ||
And the user uploads file "new-lorem.txt" using the webUI | ||
Then file "new-lorem.txt" should be listed on the webUI | ||
And as "user0" file "/simple-folder/new-lorem.txt" should exist | ||
Examples: | ||
| email-address | | ||
| guest@example.com | | ||
| John.Smith@email.com | | ||
| Betty_Anne+Bob-Burns@email.com | | ||
|
||
@mailhog | ||
Scenario: Guest user tries to upload or create files inside the received share(read only permission) | ||
|