-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make file expiry for guest links configurable when creating guest links #613
Conversation
…le expiration for uploads, adapt tests
…ecrease with time (example guest with expiration limit of 30 for URL and file can still upload a file after 29 days which will be persisted for 30 days)
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks for adding this!
This is a good direction.
I think we need to add test coverage for the new functionality and reuse existing logic for expiration times, but we're on the right track.
…oesn't decrease with time (example guest with expiration limit of 30 for URL and file can still upload a file after 29 days which will be persisted for 30 days)" This reverts commit cc0bcad.
@mtlynch This is a version using ExpirationTime instead of string. Some issues you mentioned still persist i.e. when adding new options in |
d02619f
to
cedfbf4
Compare
Alrighty @mtlynch. I went ahead and reused FileLifetime to accomplish what's suggested above. Pretty sure we are pretty close.
Also this is what the guest URL overview would look like, maybe also not optimal but I am trying to retain the style of the other functions: Interested in more of your brilliant suggestions :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, nice progress! I added a few notes for things that I think might be getting in the way.
b87d0ba
to
a0f9147
Compare
…eLifetime is not never
Heya @mtlynch! I think it's finally in an acceptable state. I had to add a helper function for the upload test as I was clueless how else to make it work, hope that is alright. (see: The only remaining issue from my point of view is the display of the file expiration time in the fileIndex/fileInfo views when the FileLifetime is infinite, as per my last comment and screenshots. Not sure how we could extend the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, this looks pretty close!
We're down to just a few naming things and small refactorings.
…UploadTests to include a FileLifetime
@mtlynch I have implemented all of your suggestions (I believe). Had to add a FileLifetime to some of the GuestUploadTests as we now require a FileLifetime of at least 1 day. My previous point about the filesIndex/fileInfo views still remains, maybe you have an idea for that. Lastly, as there is quite a few commits now, would you like me to squash all of the commits down into one (commit msg: adding guest file expiry option when creating guest links) once we are done here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, this looks great! Thanks so much for implementing this.
I have implemented all of your suggestions (I believe). Had to add a FileLifetime to some of the GuestUploadTests as we now require a FileLifetime of at least 1 day.
Nice, sounds good.
My previous point about the filesIndex/fileInfo views still remains, maybe you have an idea for that.
Sorry, I can't find your question about that. The guest link index looks good to me as-is. Was there something you thought we should change?
Lastly, as there is quite a few commits now, would you like me to squash all of the commits down into one (commit msg: adding guest file expiry option when creating guest links) once we are done here?
No, Github has squash and merge built in, so you should never have to manually squash commits. Also, it's helpful if you can avoid force-pushing as well, as that makes the change a bit harder to review.
This PR is trying to implement the feature request in #515 by allowing to configure file expiration for guest links.
To sum up what has been done:
I hope this suffices and is what you had in mind with "I'd accept a PR that implemented the functionality that allowed the admin to specify the expiration time for guest uploads.".