Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1008,3 +1008,99 @@ Feature: sharing
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |

Scenario Outline: sharer should not be able to share a folder to a group which he/she is not member of when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "user1" has been created with default attributes and skeleton files
And group "grp1" has been created
And group "grp2" has been created
And user "user0" has been added to group "grp1"
And user "user1" has been added to group "grp2"
When user "user0" shares folder "/PARENT" with group "grp2" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user1" folder "/PARENT (2)" should not exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 403 | 200 |
| 2 | 403 | 403 |

Scenario Outline: sharer should be able to share a folder to a user who is not member of sharer group when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "user1" has been created with default attributes and skeleton files
And group "grp1" has been created
And user "user0" has been added to group "grp1"
When user "user0" shares folder "/PARENT" with user "user1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user1" folder "/PARENT (2)" should exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |

Scenario Outline: sharer should be able to share a folder to a group which he/she is member of when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "user1" has been created with default attributes and skeleton files
And group "grp1" has been created
And user "user0" has been added to group "grp1"
And user "user1" has been added to group "grp1"
When user "user0" shares folder "/PARENT" with group "grp1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user1" folder "/PARENT (2)" should exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |

Scenario Outline: sharer should not be able to share a file to a group which he/she is not member of when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "user1" has been created with default attributes and skeleton files
And group "grp1" has been created
And group "grp2" has been created
And user "user0" has been added to group "grp1"
And user "user1" has been added to group "grp2"
When user "user0" shares file "/textfile0.txt" with group "grp2" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user1" file "/textfile0 (2).txt" should not exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 403 | 200 |
| 2 | 403 | 403 |

Scenario Outline: sharer should be able to share a file to a group which he/she is member of when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "user1" has been created with default attributes and skeleton files
And group "grp1" has been created
And user "user0" has been added to group "grp1"
And user "user1" has been added to group "grp1"
When user "user0" shares folder "/textfile0.txt" with group "grp1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user1" file "/textfile0 (2).txt" should exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |

Scenario Outline: sharer should be able to share a file to a user who is not a member of sharer group when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "user1" has been created with default attributes and skeleton files
And group "grp1" has been created
And user "user0" has been added to group "grp1"
When user "user0" shares folder "/textfile0.txt" with user "user1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user1" file "/textfile0 (2).txt" should exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |
32 changes: 32 additions & 0 deletions tests/acceptance/features/apiShareReshare/reShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,35 @@ Feature: sharing
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |

Scenario Outline: User should not be able to re-share a folder to a group which he/she is not member of when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "user2" has been created with default attributes and skeleton files
And group "grp1" has been created
And user "user2" has been added to group "grp1"
And user "user0" has shared folder "/PARENT" with user "user1"
When user "user1" shares folder "/PARENT" with group "grp1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user2" folder "/PARENT (2)" should not exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 403 | 200 |
| 2 | 403 | 403 |

Scenario Outline: User should not be able to re-share a file to a group which he/she is not member of when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "user2" has been created with default attributes and skeleton files
And group "grp1" has been created
And user "user2" has been added to group "grp1"
And user "user0" has shared file "/textfile0.txt" with user "user1"
When user "user1" shares folder "/textfile0.txt" with group "grp1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user2" folder "/textfile0 (2).txt" should not exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 403 | 200 |
| 2 | 403 | 403 |