Merge pull request #4982 from nextcloud/bugfix/enforced-max-expire-date-link-share-fix

Fix link shares default expire date being enforced as maximum expire date even when maximum date enforcement is disabled on the server
This commit is contained in:
Claudio Cambra 2022-10-04 01:13:20 +02:00 committed by GitHub
commit e5d5471fb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -485,7 +485,7 @@ void ShareLinkWidget::toggleExpireDateOptions(const bool enable)
_ui->calendar->setDate(date); _ui->calendar->setDate(date);
_ui->calendar->setMinimumDate(QDate::currentDate().addDays(1)); _ui->calendar->setMinimumDate(QDate::currentDate().addDays(1));
if(_account->capabilities().sharePublicLinkExpireDateDays() > 0) { if(_account->capabilities().sharePublicLinkEnforceExpireDate()) {
_ui->calendar->setMaximumDate(QDate::currentDate().addDays(_account->capabilities().sharePublicLinkExpireDateDays())); _ui->calendar->setMaximumDate(QDate::currentDate().addDays(_account->capabilities().sharePublicLinkExpireDateDays()));
} }