|
|
|
|
@ -71,6 +71,138 @@ Feature: contacts-menu |
|
|
|
|
And searched contact "1" is named "Test name" |
|
|
|
|
And searched contact "2" is named "user2" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario: users can not be searched by display name when searcher belongs to a group excluded from sharing |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And group "ExcludedGroup" exists |
|
|
|
|
And user "user0" belongs to group "ExcludedGroup" |
|
|
|
|
And parameter "shareapi_exclude_groups" of app "core" is set to "yes" |
|
|
|
|
And parameter "shareapi_exclude_groups_list" of app "core" is set to "ExcludedGroup" |
|
|
|
|
And user "user1" exists |
|
|
|
|
And As an "admin" |
|
|
|
|
And sending "PUT" to "/cloud/users/user1" with |
|
|
|
|
| key | displayname | |
|
|
|
|
| value | Test name | |
|
|
|
|
When Logging in using web as "user0" |
|
|
|
|
And searching for contacts matching with "test" |
|
|
|
|
Then the list of searched contacts has "0" contacts |
|
|
|
|
|
|
|
|
|
Scenario: users can not be searched by email when searcher belongs to a group excluded from sharing |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And group "ExcludedGroup" exists |
|
|
|
|
And user "user0" belongs to group "ExcludedGroup" |
|
|
|
|
And parameter "shareapi_exclude_groups" of app "core" is set to "yes" |
|
|
|
|
And parameter "shareapi_exclude_groups_list" of app "core" is set to "ExcludedGroup" |
|
|
|
|
And user "user1" exists |
|
|
|
|
And As an "admin" |
|
|
|
|
And sending "PUT" to "/cloud/users/user1" with |
|
|
|
|
| key | email | |
|
|
|
|
| value | test@example.com | |
|
|
|
|
When Logging in using web as "user0" |
|
|
|
|
And searching for contacts matching with "test" |
|
|
|
|
Then the list of searched contacts has "0" contacts |
|
|
|
|
|
|
|
|
|
Scenario: users can not be searched by display name when searcher belongs to both a group excluded from sharing and another group |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And group "ExcludedGroup" exists |
|
|
|
|
And user "user0" belongs to group "ExcludedGroup" |
|
|
|
|
And group "AnotherGroup" exists |
|
|
|
|
And user "user0" belongs to group "AnotherGroup" |
|
|
|
|
And parameter "shareapi_exclude_groups" of app "core" is set to "yes" |
|
|
|
|
And parameter "shareapi_exclude_groups_list" of app "core" is set to "ExcludedGroup" |
|
|
|
|
And user "user1" exists |
|
|
|
|
And As an "admin" |
|
|
|
|
And sending "PUT" to "/cloud/users/user1" with |
|
|
|
|
| key | displayname | |
|
|
|
|
| value | Test name | |
|
|
|
|
When Logging in using web as "user0" |
|
|
|
|
And searching for contacts matching with "test" |
|
|
|
|
Then the list of searched contacts has "0" contacts |
|
|
|
|
|
|
|
|
|
Scenario: users can not be searched by email when searcher belongs to both a group excluded from sharing and another group |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And group "ExcludedGroup" exists |
|
|
|
|
And user "user0" belongs to group "ExcludedGroup" |
|
|
|
|
And group "AnotherGroup" exists |
|
|
|
|
And user "user0" belongs to group "AnotherGroup" |
|
|
|
|
And parameter "shareapi_exclude_groups" of app "core" is set to "yes" |
|
|
|
|
And parameter "shareapi_exclude_groups_list" of app "core" is set to "ExcludedGroup" |
|
|
|
|
And user "user1" exists |
|
|
|
|
And As an "admin" |
|
|
|
|
And sending "PUT" to "/cloud/users/user1" with |
|
|
|
|
| key | email | |
|
|
|
|
| value | test@example.com | |
|
|
|
|
When Logging in using web as "user0" |
|
|
|
|
And searching for contacts matching with "test" |
|
|
|
|
Then the list of searched contacts has "0" contacts |
|
|
|
|
|
|
|
|
|
Scenario: users can not be searched by display name when searcher does not belong to a group allowed to share |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And group "AllowedGroup" exists |
|
|
|
|
And parameter "shareapi_exclude_groups" of app "core" is set to "allow" |
|
|
|
|
And parameter "shareapi_exclude_groups_list" of app "core" is set to "AllowedGroup" |
|
|
|
|
And user "user1" exists |
|
|
|
|
And As an "admin" |
|
|
|
|
And sending "PUT" to "/cloud/users/user1" with |
|
|
|
|
| key | displayname | |
|
|
|
|
| value | Test name | |
|
|
|
|
When Logging in using web as "user0" |
|
|
|
|
And searching for contacts matching with "test" |
|
|
|
|
Then the list of searched contacts has "0" contacts |
|
|
|
|
|
|
|
|
|
Scenario: users can not be searched by email when searcher does not belong to a group allowed to share |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And group "AllowedGroup" exists |
|
|
|
|
And parameter "shareapi_exclude_groups" of app "core" is set to "allow" |
|
|
|
|
And parameter "shareapi_exclude_groups_list" of app "core" is set to "AllowedGroup" |
|
|
|
|
And user "user1" exists |
|
|
|
|
And As an "admin" |
|
|
|
|
And sending "PUT" to "/cloud/users/user1" with |
|
|
|
|
| key | email | |
|
|
|
|
| value | test@example.com | |
|
|
|
|
When Logging in using web as "user0" |
|
|
|
|
And searching for contacts matching with "test" |
|
|
|
|
Then the list of searched contacts has "0" contacts |
|
|
|
|
|
|
|
|
|
Scenario: users can be searched by display name when searcher belongs to both a group allowed to share and another group |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And group "AllowedGroup" exists |
|
|
|
|
And user "user0" belongs to group "AllowedGroup" |
|
|
|
|
And group "AnotherGroup" exists |
|
|
|
|
And user "user0" belongs to group "AnotherGroup" |
|
|
|
|
And parameter "shareapi_exclude_groups" of app "core" is set to "allow" |
|
|
|
|
And parameter "shareapi_exclude_groups_list" of app "core" is set to "AllowedGroup" |
|
|
|
|
And user "user1" exists |
|
|
|
|
And As an "admin" |
|
|
|
|
And sending "PUT" to "/cloud/users/user1" with |
|
|
|
|
| key | displayname | |
|
|
|
|
| value | Test name | |
|
|
|
|
When Logging in using web as "user0" |
|
|
|
|
And searching for contacts matching with "test" |
|
|
|
|
Then the list of searched contacts has "1" contacts |
|
|
|
|
And searched contact "0" is named "Test name" |
|
|
|
|
|
|
|
|
|
Scenario: users can be searched by email when searcher belongs to both a group allowed to share and another group |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And group "AllowedGroup" exists |
|
|
|
|
And user "user0" belongs to group "AllowedGroup" |
|
|
|
|
And group "AnotherGroup" exists |
|
|
|
|
And user "user0" belongs to group "AnotherGroup" |
|
|
|
|
And parameter "shareapi_exclude_groups" of app "core" is set to "allow" |
|
|
|
|
And parameter "shareapi_exclude_groups_list" of app "core" is set to "AllowedGroup" |
|
|
|
|
And user "user1" exists |
|
|
|
|
And As an "admin" |
|
|
|
|
And sending "PUT" to "/cloud/users/user1" with |
|
|
|
|
| key | email | |
|
|
|
|
| value | test@example.com | |
|
|
|
|
When Logging in using web as "user0" |
|
|
|
|
And searching for contacts matching with "test" |
|
|
|
|
Then the list of searched contacts has "1" contacts |
|
|
|
|
And searched contact "0" is named "user1" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario: users can not be found by display name if visibility is private |
|
|
|
|
Given user "user0" exists |
|
|
|
|
And user "user1" exists |
|
|
|
|
|