set virtual owner on non-personal spaces

This commit is contained in:
Michael Barz
2022-07-20 12:10:22 +02:00
parent 19c9125fdf
commit cce04f94ff
7 changed files with 30 additions and 44 deletions
@@ -35,18 +35,15 @@ Feature: A manager of the space can edit public link
And the OCS status code should be "200"
And the OCS status message should be "OK"
And the fields of the last response to user "Alice" should include
| item_type | folder |
| mimetype | httpd/unix-directory |
| file_target | / |
| path | / |
| permissions | <expectedPermissions> |
| share_type | public_link |
| displayname_file_owner | %displayname% |
| displayname_owner | %displayname% |
| uid_file_owner | %username% |
| uid_owner | %username% |
| name | <linkName> |
| expiration | <expireDate> |
| item_type | folder |
| mimetype | httpd/unix-directory |
| file_target | / |
| path | / |
| permissions | <expectedPermissions> |
| share_type | public_link |
| displayname_owner | %displayname% |
| name | <linkName> |
| expiration | <expireDate> |
And the public should be able to download file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "<password>"
And the downloaded content should be "some content"
Examples:
@@ -65,8 +62,8 @@ Feature: A manager of the space can edit public link
Examples:
| role | shouldOrNot |
| manager | should |
| editor | should not |
| viewer | should not |
| editor | should |
| viewer | should |
Scenario Outline: Members of the space try to edit a public link
@@ -32,9 +32,7 @@ Feature: Share spaces via link
| path | / |
| permissions | <expectedPermissions> |
| share_type | public_link |
| displayname_file_owner | %displayname% |
| displayname_owner | %displayname% |
| uid_file_owner | %username% |
| uid_owner | %username% |
| name | <linkName> |
And the public should be able to download file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "<password>"
@@ -57,17 +55,15 @@ Feature: Share spaces via link
And the OCS status code should be "200"
And the OCS status message should be "OK"
And the fields of the last response to user "Alice" should include
| item_type | folder |
| mimetype | httpd/unix-directory |
| file_target | / |
| path | / |
| permissions | create |
| share_type | public_link |
| displayname_file_owner | %displayname% |
| displayname_owner | %displayname% |
| uid_file_owner | %username% |
| uid_owner | %username% |
| name | forUpload |
| item_type | folder |
| mimetype | httpd/unix-directory |
| file_target | / |
| path | / |
| permissions | create |
| share_type | public_link |
| displayname_owner | %displayname% |
| uid_owner | %username% |
| name | forUpload |
And the public should be able to upload file "lorem.txt" into the last public link shared folder using the new public WebDAV API with password "123"
And for user "Alice" the space "share space" should contain these entries:
| lorem.txt |
@@ -2843,18 +2843,12 @@ class SpacesContext implements Context {
string $shouldOrNot
): void {
$space = $this->getSpaceByName($user, $spaceName);
$url = "/apps/files_sharing/api/v1/shares";
$bodyTable = new TableNode([
["space_ref", $space['id']],
["reshares", true],
]);
$url = "/apps/files_sharing/api/v1/shares?reshares=true&space_ref=" . $space['id'];
$this->ocsContext->userSendsHTTPMethodToOcsApiEndpointWithBody(
$user,
'GET',
$url,
$bodyTable
);
$should = ($shouldOrNot !== "not");