seafile
seafile copied to clipboard
Allow a middle ground when using the default expiration date of share links
I feel that using SHARE_LINK_EXPIRE_DAYS_DEFAULT
of seahub settings is an all or nothing situation: if set to zero then the create link dialog uses no expiration as default, so most links will be created without expiration, if set to some number then there's a default expiration, but no way to remove it. I want to encourage users to use expiration dates for their links but give them the liberty to disable it if they think this is necessary.
This could be implemented with a SHARE_LINK_FORCE_DEFAULT_EXPIRE = True/False
option with True
being the current behavior.
I know that expiration dates can have no limit, so you could set an arbitrary large value, but I don't like this solution because:
- How long is "no expiration" might not be obvious to select at first since it depends of the purpose of the link and how long you think you will need it.
- If you aren't conservative and the link does expire then it can't be renewed, you have to create it and share it again, update documents, etc.
- If you're conservative and pick an expiration date hundred of years in the future then the administration panel will list all links with expiration dates, and you have to pay attention to the dates to see that oh, this link never expires for all practical purposes. Showing no date is clean and quick to interpret.