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
4 changes: 2 additions & 2 deletions apps/files_sharing/src/components/NewFileRequestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ export default defineComponent({
path: this.destination,
note: this.note,

password: this.password || undefined,
expireDate: expireDate || undefined,
password: this.password || '',
expireDate: expireDate || '',

// Empty string
shareWith: '',
Expand Down
6 changes: 5 additions & 1 deletion build/integration/features/bootstrap/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ public function asCreatingAShareWith($user, $body) {
$fd = $body->getRowsHash();
if (array_key_exists('expireDate', $fd)) {
$dateModification = $fd['expireDate'];
if (!empty($dateModification)) {
if ($dateModification === 'null') {
$fd['expireDate'] = null;
} elseif (!empty($dateModification)) {
$fd['expireDate'] = date('Y-m-d', strtotime($dateModification));
} else {
$fd['expireDate'] = '';
}
}
$options['form_params'] = $fd;
Expand Down
42 changes: 40 additions & 2 deletions build/integration/sharing_features/sharing-v1.feature
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,11 @@ Feature: sharing
| url | AN_URL |
| mimetype | httpd/unix-directory |

Scenario: Creating a new share with expiration date removed, when default expiration is set
Scenario: Creating a new share with expiration date empty, when default expiration is set
Given user "user0" exists
And user "user1" exists
And parameter "shareapi_default_expire_date" of app "core" is set to "yes"
And parameter "shareapi_default_internal_expire_date" of app "core" is set to "yes"
And parameter "shareapi_internal_expire_after_n_days" of app "core" is set to "3"
And As an "user0"
When creating a share with
| path | welcome.txt |
Expand All @@ -249,6 +250,43 @@ Feature: sharing
And Share fields of last share match with
| expiration ||

Scenario: Creating a new share with expiration date removed, when default expiration is set
Given user "user0" exists
And user "user1" exists
And parameter "shareapi_default_internal_expire_date" of app "core" is set to "yes"
And parameter "shareapi_internal_expire_after_n_days" of app "core" is set to "3"
And As an "user0"
When creating a share with
| path | welcome.txt |
| shareWith | user1 |
| shareType | 0 |
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And Getting info of last share
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And Share fields of last share match with
| expiration | +3 days |

Scenario: Creating a new share with expiration date null, when default expiration is set
Given user "user0" exists
And user "user1" exists
And parameter "shareapi_default_internal_expire_date" of app "core" is set to "yes"
And parameter "shareapi_internal_expire_after_n_days" of app "core" is set to "3"
And As an "user0"
When creating a share with
| path | welcome.txt |
| shareWith | user1 |
| shareType | 0 |
| expireDate | null |
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And Getting info of last share
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And Share fields of last share match with
| expiration | +3 days |

Scenario: Creating a new public share, updating its password and getting its info
Given user "user0" exists
And As an "user0"
Expand Down
4 changes: 2 additions & 2 deletions dist/9835-9835.js → dist/5291-5291.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/5291-5291.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/5291-5291.js.map.license
1 change: 0 additions & 1 deletion dist/9835-9835.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/9835-9835.js.map.license

This file was deleted.

4 changes: 2 additions & 2 deletions dist/files_sharing-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-init.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/public/Share/IShare.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function setExpirationDate(?\DateTime $expireDate);
public function getExpirationDate();

/**
* Set overwrite flag for falsy expiry date vavlues
* Set overwrite flag for falsy expiry date values
*
* @param bool $noExpirationDate
* @return \OCP\Share\IShare The modified object
Expand Down
Loading