copy feature files from core
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
@api @files_sharing-app-required @notToImplementOnOCIS
|
||||
Feature: shares are received in the default folder for received shares
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
|
||||
|
||||
Scenario Outline: Do not allow sharing of the entire share_folder
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And the administrator has set the default folder for received shares to "<share_folder>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has shared folder "/FOLDER" with user "Brian"
|
||||
And user "Brian" has unshared folder "ReceivedShares/FOLDER"
|
||||
When user "Brian" shares folder "/ReceivedShares" with user "Alice" using the sharing API
|
||||
Then the OCS status code should be "404"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
Examples:
|
||||
| ocs_api_version | http_status_code | share_folder |
|
||||
| 1 | 200 | /ReceivedShares |
|
||||
| 2 | 404 | /ReceivedShares |
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
@api @files_sharing-app-required @notToImplementOnOCIS
|
||||
Feature: sharing works when a username and group name are the same
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
|
||||
|
||||
@skipOnLDAP
|
||||
Scenario: creating a new share with user and a group having same name
|
||||
Given these users have been created without skeleton files:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
And group "Brian" has been created
|
||||
And user "Carol" has been added to group "Brian"
|
||||
And user "Alice" has shared file "randomfile.txt" with group "Brian"
|
||||
When user "Alice" shares file "randomfile.txt" with user "Brian" using the sharing API
|
||||
Then the OCS status code should be "100"
|
||||
And the HTTP status code should be "200"
|
||||
And user "Brian" should see the following elements
|
||||
| /randomfile.txt |
|
||||
And user "Carol" should see the following elements
|
||||
| /randomfile.txt |
|
||||
And the content of file "randomfile.txt" for user "Brian" should be "Random data"
|
||||
And the content of file "randomfile.txt" for user "Carol" should be "Random data"
|
||||
|
||||
@skipOnLDAP
|
||||
Scenario: creating a new share with group and a user having same name
|
||||
Given these users have been created without skeleton files:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
And group "Brian" has been created
|
||||
And user "Carol" has been added to group "Brian"
|
||||
And user "Alice" has shared file "randomfile.txt" with user "Brian"
|
||||
When user "Alice" shares file "randomfile.txt" with group "Brian" using the sharing API
|
||||
Then the OCS status code should be "100"
|
||||
And the HTTP status code should be "200"
|
||||
And user "Brian" should see the following elements
|
||||
| /randomfile.txt |
|
||||
And user "Carol" should see the following elements
|
||||
| /randomfile.txt |
|
||||
And the content of file "randomfile.txt" for user "Brian" should be "Random data"
|
||||
And the content of file "randomfile.txt" for user "Carol" should be "Random data"
|
||||
|
||||
@skipOnLDAP
|
||||
Scenario: creating a new share with user and a group having same name but different case
|
||||
Given these users have been created without skeleton files:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
And group "Brian" has been created
|
||||
And user "Carol" has been added to group "Brian"
|
||||
And user "Alice" has shared file "randomfile.txt" with group "Brian"
|
||||
When user "Alice" shares file "randomfile.txt" with user "Brian" using the sharing API
|
||||
Then the OCS status code should be "100"
|
||||
And the HTTP status code should be "200"
|
||||
And user "Brian" should see the following elements
|
||||
| /randomfile.txt |
|
||||
And user "Carol" should see the following elements
|
||||
| /randomfile.txt |
|
||||
And the content of file "randomfile.txt" for user "Brian" should be "Random data"
|
||||
And the content of file "randomfile.txt" for user "Carol" should be "Random data"
|
||||
|
||||
@skipOnLDAP
|
||||
Scenario: creating a new share with group and a user having same name but different case
|
||||
Given these users have been created without skeleton files:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
And group "Brian" has been created
|
||||
And user "Carol" has been added to group "Brian"
|
||||
And user "Alice" has shared file "randomfile.txt" with user "Brian"
|
||||
When user "Alice" shares file "randomfile.txt" with group "Brian" using the sharing API
|
||||
Then the OCS status code should be "100"
|
||||
And the HTTP status code should be "200"
|
||||
And user "Carol" should see the following elements
|
||||
| /randomfile.txt |
|
||||
And user "Brian" should see the following elements
|
||||
| /randomfile.txt |
|
||||
And the content of file "randomfile.txt" for user "Carol" should be "Random data"
|
||||
And the content of file "randomfile.txt" for user "Brian" should be "Random data"
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
@api @files_sharing-app-required @notToImplementOnOCIS
|
||||
Feature: share with groups, group names are case-sensitive
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file 1" to "/textfile1.txt"
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file 2" to "/textfile2.txt"
|
||||
And user "Alice" has uploaded file with content "ownCloud test text file 3" to "/textfile3.txt"
|
||||
|
||||
@skipOnLDAP @issue-ldap-250
|
||||
Scenario Outline: group names are case-sensitive, sharing with groups with different upper and lower case names
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And group "<group_id1>" has been created
|
||||
And group "<group_id2>" has been created
|
||||
And group "<group_id3>" has been created
|
||||
And these users have been created with default attributes and without skeleton files:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
| David |
|
||||
And user "Brian" has been added to group "<group_id1>"
|
||||
And user "Carol" has been added to group "<group_id2>"
|
||||
And user "David" has been added to group "<group_id3>"
|
||||
When user "Alice" shares file "textfile1.txt" with group "<group_id1>" using the sharing API
|
||||
And user "Alice" shares file "textfile2.txt" with group "<group_id2>" using the sharing API
|
||||
And user "Alice" shares file "textfile3.txt" with group "<group_id3>" using the sharing API
|
||||
Then the OCS status code of responses on all endpoints should be "<ocs_status_code>"
|
||||
And the HTTP status code of responses on all endpoints should be "200"
|
||||
And the content of file "textfile1.txt" for user "Brian" should be "ownCloud test text file 1"
|
||||
And the content of file "textfile2.txt" for user "Carol" should be "ownCloud test text file 2"
|
||||
And the content of file "textfile3.txt" for user "David" should be "ownCloud test text file 3"
|
||||
Examples:
|
||||
| ocs_api_version | group_id1 | group_id2 | group_id3 | ocs_status_code |
|
||||
| 1 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | 100 |
|
||||
| 1 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group | 100 |
|
||||
| 1 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group | 100 |
|
||||
| 2 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | 200 |
|
||||
| 2 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group | 200 |
|
||||
| 2 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group | 200 |
|
||||
|
||||
@skipOnLDAP @issue-ldap-250
|
||||
Scenario Outline: group names are case-sensitive, sharing with nonexistent groups with different upper and lower case names
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And these users have been created with default attributes and without skeleton files:
|
||||
| username |
|
||||
| Brian |
|
||||
And group "<group_id1>" has been created
|
||||
And user "Brian" has been added to group "<group_id1>"
|
||||
When user "Alice" shares file "textfile1.txt" with group "<group_id1>" using the sharing API
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "200"
|
||||
And the fields of the last response to user "Alice" should include
|
||||
| share_with | <group_id1> |
|
||||
| file_target | /textfile1.txt |
|
||||
| path | /textfile1.txt |
|
||||
| permissions | share,read,update |
|
||||
| uid_owner | %username% |
|
||||
And the content of file "textfile1.txt" for user "Brian" should be "ownCloud test text file 1"
|
||||
When user "Alice" shares file "textfile2.txt" with group "<group_id2>" using the sharing API
|
||||
Then the OCS status code should be "404"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
When user "Alice" shares file "textfile3.txt" with group "<group_id3>" using the sharing API
|
||||
Then the OCS status code should be "404"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
Examples:
|
||||
| ocs_api_version | group_id1 | group_id2 | group_id3 | ocs_status_code | http_status_code |
|
||||
| 1 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | 100 | 200 |
|
||||
| 1 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group | 100 | 200 |
|
||||
| 1 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group | 100 | 200 |
|
||||
| 2 | case-sensitive-group | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | 200 | 404 |
|
||||
| 2 | Case-Sensitive-Group | CASE-SENSITIVE-GROUP | case-sensitive-group | 200 | 404 |
|
||||
| 2 | CASE-SENSITIVE-GROUP | case-sensitive-group | Case-Sensitive-Group | 200 | 404 |
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
@api @files_sharing-app-required @notToImplementOnOCIS
|
||||
Feature: cannot share resources outside the group when share with membership groups is enabled
|
||||
|
||||
Background:
|
||||
Given these users have been created with default attributes and without skeleton files:
|
||||
| username |
|
||||
| Alice |
|
||||
| Brian |
|
||||
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
|
||||
And group "grp0" has been created
|
||||
And user "Alice" has been added to group "grp0"
|
||||
|
||||
|
||||
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 group "grp1" has been created
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has created folder "PARENT"
|
||||
When user "Alice" 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 "Brian" folder "/PARENT" 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 user "Alice" has created folder "PARENT"
|
||||
When user "Alice" shares folder "/PARENT" with user "Brian" 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 "Brian" folder "/PARENT" 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 user "Brian" has been added to group "grp0"
|
||||
And user "Alice" has created folder "PARENT"
|
||||
When user "Alice" shares folder "/PARENT" with group "grp0" 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 "Brian" folder "/PARENT" 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 group "grp1" has been created
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
When user "Alice" shares file "/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 "Brian" file "/textfile0.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 user "Brian" has been added to group "grp0"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
When user "Alice" shares folder "/textfile0.txt" with group "grp0" 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 "Brian" file "/textfile0.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 user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
When user "Alice" shares folder "/textfile0.txt" with user "Brian" 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 "Brian" file "/textfile0.txt" should exist
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code | http_status_code |
|
||||
| 1 | 100 | 200 |
|
||||
| 2 | 200 | 200 |
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
@api @files_sharing-app-required @notToImplementOnOCIS
|
||||
Feature: share resources with a disabled user
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToShare.txt"
|
||||
|
||||
|
||||
Scenario Outline: Creating a new share with a disabled user
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has been disabled
|
||||
When user "Alice" shares file "fileToShare.txt" with user "Brian" using the sharing API
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "401"
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code |
|
||||
| 1 | 997 |
|
||||
|
||||
@issue-32068 @skipOnOcV10
|
||||
Scenario: Creating a new share with a disabled user
|
||||
Given using OCS API version "2"
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has been disabled
|
||||
When user "Alice" shares file "fileToShare.txt" with user "Brian" using the sharing API
|
||||
Then the OCS status code should be "401"
|
||||
And the HTTP status code should be "401"
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
@api @files_sharing-app-required @notToImplementOnOCIS
|
||||
Feature: share resources with a disabled user - current oC10 behavior for issue-32068
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToShare.txt"
|
||||
|
||||
@issue-32068
|
||||
Scenario: Creating a new share with a disabled user
|
||||
Given using OCS API version "2"
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has been disabled
|
||||
When user "Alice" shares file "fileToShare.txt" with user "Brian" using the sharing API
|
||||
Then the OCS status code should be "997"
|
||||
#Then the OCS status code should be "401"
|
||||
And the HTTP status code should be "401"
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
@api @files_sharing-app-required @notToImplementOnOCIS
|
||||
Feature: cannot share resources with invalid permissions
|
||||
|
||||
Background:
|
||||
Given these users have been created with default attributes and without skeleton files:
|
||||
| username |
|
||||
| Alice |
|
||||
| Brian |
|
||||
|
||||
|
||||
Scenario Outline: Cannot create a share of a file with invalid permissions
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
When user "Alice" creates a share using the sharing API with settings
|
||||
| path | textfile0.txt |
|
||||
| shareWith | Brian |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
And as "Brian" entry "/textfile0.txt" should not exist
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code | http_status_code | permissions |
|
||||
| 1 | 400 | 200 | 0 |
|
||||
| 2 | 400 | 400 | 0 |
|
||||
| 1 | 404 | 200 | 32 |
|
||||
| 2 | 404 | 404 | 32 |
|
||||
|
||||
|
||||
Scenario Outline: Cannot create a share of a folder with invalid permissions
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And user "Alice" has created folder "PARENT"
|
||||
When user "Alice" creates a share using the sharing API with settings
|
||||
| path | PARENT |
|
||||
| shareWith | Brian |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
And as "Brian" entry "PARENT" should not exist
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code | http_status_code | permissions |
|
||||
| 1 | 400 | 200 | 0 |
|
||||
| 2 | 400 | 400 | 0 |
|
||||
| 1 | 404 | 200 | 32 |
|
||||
| 2 | 404 | 404 | 32 |
|
||||
|
||||
|
||||
Scenario Outline: Cannot create a share of a file with a user with only create permission
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
When user "Alice" creates a share using the sharing API with settings
|
||||
| path | textfile0.txt |
|
||||
| shareWith | Brian |
|
||||
| shareType | user |
|
||||
| permissions | create |
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
And as "Brian" entry "textfile0.txt" should not exist
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code | http_status_code |
|
||||
| 1 | 400 | 200 |
|
||||
| 2 | 400 | 400 |
|
||||
|
||||
|
||||
Scenario Outline: Cannot create a share of a file with a user with only (create,delete) permission
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
When user "Alice" creates a share using the sharing API with settings
|
||||
| path | textfile0.txt |
|
||||
| shareWith | Brian |
|
||||
| shareType | user |
|
||||
| permissions | <permissions> |
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
And as "Brian" entry "textfile0.txt" should not exist
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code | http_status_code | permissions |
|
||||
| 1 | 400 | 200 | delete |
|
||||
| 2 | 400 | 400 | delete |
|
||||
| 1 | 400 | 200 | create,delete |
|
||||
| 2 | 400 | 400 | create,delete |
|
||||
|
||||
@issue-ocis-reva-34
|
||||
Scenario Outline: Cannot create a share of a file with a group with only create permission
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And group "grp1" has been created
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
When user "Alice" creates a share using the sharing API with settings
|
||||
| path | textfile0.txt |
|
||||
| shareWith | grp1 |
|
||||
| shareType | group |
|
||||
| permissions | create |
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
And as "Brian" entry "textfile0.txt" should not exist
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code | http_status_code |
|
||||
| 1 | 400 | 200 |
|
||||
| 2 | 400 | 400 |
|
||||
|
||||
@issue-ocis-reva-34
|
||||
Scenario Outline: Cannot create a share of a file with a group with only (create,delete) permission
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And group "grp1" has been created
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
When user "Alice" creates a share using the sharing API with settings
|
||||
| path | textfile0.txt |
|
||||
| shareWith | grp1 |
|
||||
| shareType | group |
|
||||
| permissions | <permissions> |
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "<http_status_code>"
|
||||
And as "Brian" entry "textfile0.txt" should not exist
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code | http_status_code | permissions |
|
||||
| 1 | 400 | 200 | delete |
|
||||
| 2 | 400 | 400 | delete |
|
||||
| 1 | 400 | 200 | create,delete |
|
||||
| 2 | 400 | 400 | create,delete |
|
||||
Reference in New Issue
Block a user