Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

enh: Fix display default expire date, add tests & tiny refactors #50655

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

nfebe
Copy link
Contributor

@nfebe nfebe commented Feb 4, 2025

Resolves : #50495

Screencasts

Show default expiration date before create share

show-default-date.mp4

Quick share select updated without refresh

quick-share.mp4

Checklist

@nfebe nfebe force-pushed the fix/share-sidebar-bugs branch from 97c913b to e0450ea Compare February 5, 2025 17:14
@nfebe
Copy link
Contributor Author

nfebe commented Feb 5, 2025

/backport to stable31

@nfebe
Copy link
Contributor Author

nfebe commented Feb 5, 2025

/backport to stable30

@nfebe
Copy link
Contributor Author

nfebe commented Feb 5, 2025

/backport to stable29

@nfebe nfebe marked this pull request as ready for review February 5, 2025 17:53
@nfebe nfebe added the 3. to review Waiting for reviews label Feb 5, 2025
@nfebe nfebe force-pushed the fix/share-sidebar-bugs branch from e4f5688 to 02c58f8 Compare February 5, 2025 17:53
@nfebe
Copy link
Contributor Author

nfebe commented Feb 5, 2025

/compile

@nfebe nfebe requested a review from skjnldsv February 5, 2025 17:59
@nfebe nfebe force-pushed the fix/share-sidebar-bugs branch 3 times, most recently from dda04e8 to c83bef6 Compare February 5, 2025 18:18
@nfebe nfebe force-pushed the fix/share-sidebar-bugs branch from c83bef6 to 883819d Compare February 5, 2025 18:40
@nfebe nfebe requested a review from susnux February 5, 2025 18:40
@nfebe
Copy link
Contributor Author

nfebe commented Feb 5, 2025

/compile

@@ -751,7 +751,7 @@ public function createShare(
$share->setSharedWith($shareWith);
$share->setPermissions($permissions);
} elseif ($shareType === IShare::TYPE_CIRCLE) {
if (!\OC::$server->getAppManager()->isEnabledForUser('circles') || !class_exists('\OCA\Circles\ShareByCircleProvider')) {
if (!\OC::$server->get(IAppManager::class)->isEnabledForUser('circles') || !class_exists('\OCA\Circles\ShareByCircleProvider')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!\OC::$server->get(IAppManager::class)->isEnabledForUser('circles') || !class_exists('\OCA\Circles\ShareByCircleProvider')) {
if (!\OCP\Server::get(IAppManager::class)->isEnabledForUser('circles') || !class_exists('\OCA\Circles\ShareByCircleProvider')) {

@nfebe nfebe force-pushed the fix/share-sidebar-bugs branch from d5594b0 to ea9c3ab Compare February 5, 2025 19:22
@nfebe nfebe force-pushed the fix/share-sidebar-bugs branch from ea9c3ab to d9b250a Compare February 6, 2025 09:59
@nfebe nfebe force-pushed the fix/share-sidebar-bugs branch from d9b250a to fb207ea Compare February 6, 2025 10:19
nfebe and others added 6 commits February 6, 2025 12:15
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Since `ShareEntryLink` component is used to both create and display/list the share links,
we should only set default expiration date on `share.expireDate` when we know is a new share.

Otherwise, we overidding data from the backend.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
…reate share

Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: nfebe <fenn25.fn@gmail.com>
…nput

Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: 🏗️ In progress
Development

Successfully merging this pull request may close these issues.

[Bug]: Default link share expiration date not visible
6 participants