Skip to content

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

Merged
nfebe merged 6 commits into
masterfrom
fix/share-sidebar-bugs
Feb 6, 2025
Merged

enh: Fix display default expire date, add tests & tiny refactors#50655
nfebe merged 6 commits into
masterfrom
fix/share-sidebar-bugs

Conversation

@nfebe

@nfebenfebe commented Feb 4, 2025

Copy link
Copy Markdown
Contributor

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 commented Feb 5, 2025

Copy link
Copy Markdown
ContributorAuthor

/backport to stable31

@nfebe

nfebe commented Feb 5, 2025

Copy link
Copy Markdown
ContributorAuthor

/backport to stable30

@nfebe

nfebe commented Feb 5, 2025

Copy link
Copy Markdown
ContributorAuthor

/backport to stable29

@nfebe
nfebe marked this pull request as ready for review February 5, 2025 17:53
@nfebenfebe added the 3. to review Waiting for reviews label Feb 5, 2025
@nfebe
nfebeforce-pushed the fix/share-sidebar-bugs branch from e4f5688 to 02c58f8CompareFebruary 5, 2025 17:53
@nfebe

nfebe commented Feb 5, 2025

Copy link
Copy Markdown
ContributorAuthor

/compile

Comment threadapps/files_sharing/lib/Controller/ShareAPIController.php Outdated
@nfebe
nfebe requested a review from skjnldsvFebruary 5, 2025 17:59
Comment threadapps/files_sharing/src/components/SharingEntryLink.vue Outdated
@nfebe
nfebeforce-pushed the fix/share-sidebar-bugs branch 3 times, most recently from dda04e8 to c83bef6CompareFebruary 5, 2025 18:18
@nfebe
nfebeforce-pushed the fix/share-sidebar-bugs branch from c83bef6 to 883819dCompareFebruary 5, 2025 18:40
@nfebe
nfebe requested a review from susnuxFebruary 5, 2025 18:40
@nfebe

nfebe commented Feb 5, 2025

Copy link
Copy Markdown
ContributorAuthor

/compile

$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
Copy Markdown
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
nfebeforce-pushed the fix/share-sidebar-bugs branch from d5594b0 to ea9c3abCompareFebruary 5, 2025 19:22
@nfebe
nfebeforce-pushed the fix/share-sidebar-bugs branch from ea9c3ab to d9b250aCompareFebruary 6, 2025 09:59
@nfebe
nfebeforce-pushed the fix/share-sidebar-bugs branch from d9b250a to fb207eaCompareFebruary 6, 2025 10:19
nfebeand 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>
…nput
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: sharing

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Default link share expiration date not visible

6 participants

@nfebe@susnux@artonge@skjnldsv@marcoambrosini@nextcloud-command