|
|
|
|
@ -9,6 +9,13 @@ Feature: sharees
|
|
|
|
|
And group "ShareeGroup" exists
|
|
|
|
|
And user "test" belongs to group "ShareeGroup"
|
|
|
|
|
And user "Sharee2" exists
|
|
|
|
|
And As an "admin"
|
|
|
|
|
And sending "PUT" to "/cloud/users/Sharee2" with
|
|
|
|
|
| key | email |
|
|
|
|
|
| value | sharee2@system.com |
|
|
|
|
|
And sending "PUT" to "/cloud/users/Sharee2" with
|
|
|
|
|
| key | additional_mail |
|
|
|
|
|
| value | sharee2@secondary.com |
|
|
|
|
|
|
|
|
|
|
Scenario: Search without exact match
|
|
|
|
|
Given As an "test"
|
|
|
|
|
@ -20,7 +27,7 @@ Feature: sharees
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
And "users" sharees returned are
|
|
|
|
|
| Sharee1 | 0 | Sharee1 | Sharee1 |
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | Sharee2 |
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned are
|
|
|
|
|
| ShareeGroup | 1 | ShareeGroup |
|
|
|
|
|
@ -37,7 +44,7 @@ Feature: sharees
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
And "users" sharees returned are
|
|
|
|
|
| Sharee1 | 0 | Sharee1 | Sharee1 |
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | Sharee2 |
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned are
|
|
|
|
|
| ShareeGroup | 1 | ShareeGroup |
|
|
|
|
|
@ -258,8 +265,183 @@ Feature: sharees
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
And "users" sharees returned are
|
|
|
|
|
| Sharee1 | 0 | Sharee1 | Sharee1 |
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | Sharee2 |
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search user by system e-mail address
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@system.com |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 0 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
# UserPlugin provides two identical results (except for the field order, but
|
|
|
|
|
# that is hidden by the check).
|
|
|
|
|
And "exact users" sharees returned are
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
And "users" sharees returned is empty
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned is empty
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search user by system e-mail address without exact match
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@system.c |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 0 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
And "users" sharees returned are
|
|
|
|
|
| Sharee2 | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned is empty
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search user by secondary e-mail address
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@secondary.com |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 0 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
# UserPlugin only searches in the system e-mail address, but not in
|
|
|
|
|
# secondary addresses.
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
And "users" sharees returned is empty
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned is empty
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search user by secondary e-mail address without exact match
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@secondary.c |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 0 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
# UserPlugin only searches in the system e-mail address, but not in
|
|
|
|
|
# secondary addresses.
|
|
|
|
|
And "users" sharees returned is empty
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned is empty
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search e-mail
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@unknown.com |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 4 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
And "users" sharees returned is empty
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned are
|
|
|
|
|
| sharee2@unknown.com | 4 | sharee2@unknown.com |
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search e-mail matching system e-mail address of user
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@system.com |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 4 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
And "exact users" sharees returned are
|
|
|
|
|
| Sharee2 (sharee2@system.com) | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
And "users" sharees returned is empty
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned is empty
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search e-mail partially matching system e-mail address of user
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@system.c |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 4 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
# MailPlugin adds a result for every e-mail address of the contact unless
|
|
|
|
|
# there is an exact match.
|
|
|
|
|
And "users" sharees returned are
|
|
|
|
|
| Sharee2 (sharee2@system.com) | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
| Sharee2 (sharee2@secondary.com) | 0 | Sharee2 | sharee2@secondary.com |
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned are
|
|
|
|
|
| sharee2@system.c | 4 | sharee2@system.c |
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search e-mail matching secondary e-mail address of user
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@secondary.com |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 4 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
And "exact users" sharees returned are
|
|
|
|
|
| Sharee2 (sharee2@secondary.com) | 0 | Sharee2 | sharee2@secondary.com |
|
|
|
|
|
And "users" sharees returned is empty
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned is empty
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|
|
|
|
|
Scenario: Search e-mail partially matching secondary e-mail address of user
|
|
|
|
|
Given As an "test"
|
|
|
|
|
When getting sharees for
|
|
|
|
|
| search | sharee2@secondary.c |
|
|
|
|
|
| itemType | file |
|
|
|
|
|
| shareType | 4 |
|
|
|
|
|
Then the OCS status code should be "100"
|
|
|
|
|
And the HTTP status code should be "200"
|
|
|
|
|
And "exact users" sharees returned is empty
|
|
|
|
|
# MailPlugin adds a result for every e-mail address of the contact unless
|
|
|
|
|
# there is an exact match.
|
|
|
|
|
And "users" sharees returned are
|
|
|
|
|
| Sharee2 (sharee2@system.com) | 0 | Sharee2 | sharee2@system.com |
|
|
|
|
|
| Sharee2 (sharee2@secondary.com) | 0 | Sharee2 | sharee2@secondary.com |
|
|
|
|
|
And "exact groups" sharees returned is empty
|
|
|
|
|
And "groups" sharees returned is empty
|
|
|
|
|
And "exact remotes" sharees returned is empty
|
|
|
|
|
And "remotes" sharees returned is empty
|
|
|
|
|
And "exact emails" sharees returned are
|
|
|
|
|
| sharee2@secondary.c | 4 | sharee2@secondary.c |
|
|
|
|
|
And "emails" sharees returned is empty
|
|
|
|
|
|