Skip to content

Comments

feat: list expired public links#24

Merged
diocas merged 2 commits intocernbox:masterfrom
rodcoffani:feat/expired-public-links
Mar 27, 2025
Merged

feat: list expired public links#24
diocas merged 2 commits intocernbox:masterfrom
rodcoffani:feat/expired-public-links

Conversation

@rodcoffani
Copy link
Contributor

expired public links are now listed

@jessegeens jessegeens self-requested a review March 26, 2025 08:31
Copy link
Contributor

@jessegeens jessegeens left a comment

Choose a reason for hiding this comment

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

You still ignore expired links in getLinkByToken

@rodcoffani rodcoffani force-pushed the feat/expired-public-links branch from 39a3d42 to 1b99720 Compare March 26, 2025 09:08
@rodcoffani
Copy link
Contributor Author

You still ignore expired links in getLinkByToken

I left this way because the access to expired links still needs to be denied.
When updating the links, it's identified by the ID. Unlike when accessing the link, when it's by token.

@jessegeens
Copy link
Contributor

Then I would make that explicit, e.g. with a parameter. In fact, you can use filter for this: it doesn't matter that it then also shows orphans, because in the UI you can never "show" an orphaned share.

Because the difference by accessing via ID / token may be the case here, but that's not guaranteed. E.g. in cernboxcop I may want to get an expired link by a token, if a user reports that they cannot access a link anymore for example

@rodcoffani rodcoffani force-pushed the feat/expired-public-links branch from a218541 to 71483b6 Compare March 26, 2025 11:01
@rodcoffani
Copy link
Contributor Author

Makes sense. I returned the condition to check if it is expired based on the filter and changed its value when it's called by GetPublicShare.
This way it's possible to get the expired link with both methods, and it doesn't load when accessing an expired one.

@rodcoffani rodcoffani requested a review from jessegeens March 26, 2025 12:02
@rodcoffani rodcoffani force-pushed the feat/expired-public-links branch from 71483b6 to e870084 Compare March 26, 2025 12:05
@jessegeens
Copy link
Contributor

Yes, looks good now!

@diocas diocas merged commit 7f63696 into cernbox:master Mar 27, 2025
2 checks passed
@rodcoffani rodcoffani deleted the feat/expired-public-links branch April 24, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants