diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-02-06 16:27:42 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-07-04 06:57:00 +0200 |
commit | 15a0f8e4335307bf4b35305ccfe9ce200ddc8bbb (patch) | |
tree | c98c209c5ec1a01f274aa30e702c0beb2c381970 /settings/js/admin.js | |
parent | 7959605e4e389ee26705094656f636f23b9cfb8d (diff) | |
download | nextcloud-server-15a0f8e4335307bf4b35305ccfe9ce200ddc8bbb.tar.gz nextcloud-server-15a0f8e4335307bf4b35305ccfe9ce200ddc8bbb.zip |
Do not allow invalid default expire days
Currently it is possible to set a negative number of days in which a
public share expires. This results in public sharing not working and it
undesired.
Weird thing is that the API still lets you create shares and gives back
an URL. However the id is "unkown" and the URL invalid.
Diffstat (limited to 'settings/js/admin.js')
-rw-r--r-- | settings/js/admin.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js index 8f705b9048d..3e17d7cc182 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -85,6 +85,13 @@ $(document).ready(function(){ }); }); + $('#shareapiExpireAfterNDays').change(function() { + var value = $(this).val(); + if (value <= 0) { + $(this).val("1"); + } + }); + $('#shareAPI input:not(#excludedGroups)').change(function() { var value = $(this).val(); if ($(this).attr('type') === 'checkbox') { |