Browse Source

Correct check for enabled expiration date

The default expiration date cannot be enforced if it is not enabled
in the first place. Hence, the check for whether a share has an expiration date
should not consider enforcements but only where the share expiry type is enabled.

For example : Using `this.config.isDefaultExpireDateEnabled` instead of
`this.config.isDefaultExpireDateEnforced` which can be verified by checking `isExpiryDateEnforced`.

Resolves : https://github.com/nextcloud/server/issues/40612

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
fenn-cs 8 months ago
parent
commit
0537bbd331
97 changed files with 12 additions and 20 deletions
  1. 9 3
      apps/files_sharing/src/views/SharingDetailsTab.vue
  2. 0 0
      dist/3609-3609.js
  3. 0 0
      dist/3609-3609.js.map
  4. 0 0
      dist/50-50.js
  5. 0 0
      dist/50-50.js.map
  6. 1 0
      dist/520-520.js
  7. 0 0
      dist/520-520.js.LICENSE.txt
  8. 0 0
      dist/520-520.js.map
  9. 0 1
      dist/5329-5329.js
  10. 0 0
      dist/5329-5329.js.map
  11. 0 0
      dist/5912-5912.js
  12. 0 0
      dist/5912-5912.js.map
  13. 0 0
      dist/6678-6678.js
  14. 0 0
      dist/6678-6678.js.map
  15. 0 0
      dist/6870-6870.js
  16. 0 0
      dist/6870-6870.js.map
  17. 0 0
      dist/7816-7816.js
  18. 0 0
      dist/7816-7816.js.map
  19. 0 0
      dist/comments-comments-app.js
  20. 0 0
      dist/comments-comments-app.js.map
  21. 0 0
      dist/comments-init.js
  22. 0 0
      dist/comments-init.js.map
  23. 0 0
      dist/core-common.js
  24. 2 16
      dist/core-common.js.LICENSE.txt
  25. 0 0
      dist/core-common.js.map
  26. 0 0
      dist/core-login.js
  27. 0 0
      dist/core-login.js.map
  28. 0 0
      dist/core-main.js
  29. 0 0
      dist/core-main.js.map
  30. 0 0
      dist/core-profile.js
  31. 0 0
      dist/core-profile.js.map
  32. 0 0
      dist/core-unified-search.js
  33. 0 0
      dist/core-unified-search.js.map
  34. 0 0
      dist/core-unsupported-browser-redirect.js
  35. 0 0
      dist/core-unsupported-browser-redirect.js.map
  36. 0 0
      dist/core-unsupported-browser.js
  37. 0 0
      dist/core-unsupported-browser.js.map
  38. 0 0
      dist/dav-settings-personal-availability.js
  39. 0 0
      dist/dav-settings-personal-availability.js.map
  40. 0 0
      dist/federatedfilesharing-vue-settings-admin.js
  41. 0 0
      dist/federatedfilesharing-vue-settings-admin.js.map
  42. 0 0
      dist/federatedfilesharing-vue-settings-personal.js
  43. 0 0
      dist/federatedfilesharing-vue-settings-personal.js.map
  44. 0 0
      dist/files-init.js
  45. 0 0
      dist/files-init.js.map
  46. 0 0
      dist/files-main.js
  47. 0 0
      dist/files-main.js.map
  48. 0 0
      dist/files-personal-settings.js
  49. 0 0
      dist/files-personal-settings.js.map
  50. 0 0
      dist/files-reference-files.js
  51. 0 0
      dist/files-reference-files.js.map
  52. 0 0
      dist/files-sidebar.js
  53. 0 0
      dist/files-sidebar.js.map
  54. 0 0
      dist/files_external-init.js
  55. 0 0
      dist/files_external-init.js.map
  56. 0 0
      dist/files_reminders-main.js
  57. 0 0
      dist/files_reminders-main.js.map
  58. 0 0
      dist/files_sharing-files_sharing_tab.js
  59. 0 0
      dist/files_sharing-files_sharing_tab.js.map
  60. 0 0
      dist/files_sharing-init.js
  61. 0 0
      dist/files_sharing-init.js.map
  62. 0 0
      dist/files_sharing-personal-settings.js
  63. 0 0
      dist/files_sharing-personal-settings.js.map
  64. 0 0
      dist/files_trashbin-main.js
  65. 0 0
      dist/files_trashbin-main.js.map
  66. 0 0
      dist/files_versions-files_versions.js
  67. 0 0
      dist/files_versions-files_versions.js.map
  68. 0 0
      dist/settings-apps-view-7418.js
  69. 0 0
      dist/settings-apps-view-7418.js.map
  70. 0 0
      dist/settings-vue-settings-admin-basic-settings.js
  71. 0 0
      dist/settings-vue-settings-admin-basic-settings.js.map
  72. 0 0
      dist/settings-vue-settings-admin-delegation.js
  73. 0 0
      dist/settings-vue-settings-admin-delegation.js.map
  74. 0 0
      dist/settings-vue-settings-admin-security.js
  75. 0 0
      dist/settings-vue-settings-admin-security.js.map
  76. 0 0
      dist/settings-vue-settings-apps-users-management.js
  77. 0 0
      dist/settings-vue-settings-apps-users-management.js.map
  78. 0 0
      dist/settings-vue-settings-personal-info.js
  79. 0 0
      dist/settings-vue-settings-personal-info.js.map
  80. 0 0
      dist/settings-vue-settings-personal-password.js
  81. 0 0
      dist/settings-vue-settings-personal-password.js.map
  82. 0 0
      dist/settings-vue-settings-personal-security.js
  83. 0 0
      dist/settings-vue-settings-personal-security.js.map
  84. 0 0
      dist/sharebymail-vue-settings-admin-sharebymail.js
  85. 0 0
      dist/sharebymail-vue-settings-admin-sharebymail.js.map
  86. 0 0
      dist/systemtags-init.js
  87. 0 0
      dist/systemtags-init.js.map
  88. 0 0
      dist/theming-personal-theming.js
  89. 0 0
      dist/theming-personal-theming.js.map
  90. 0 0
      dist/updatenotification-updatenotification.js
  91. 0 0
      dist/updatenotification-updatenotification.js.map
  92. 0 0
      dist/user_status-menu.js
  93. 0 0
      dist/user_status-menu.js.map
  94. 0 0
      dist/weather_status-weather-status.js
  95. 0 0
      dist/weather_status-weather-status.js.map
  96. 0 0
      dist/workflowengine-workflowengine.js
  97. 0 0
      dist/workflowengine-workflowengine.js.map

+ 9 - 3
apps/files_sharing/src/views/SharingDetailsTab.vue

@@ -380,13 +380,19 @@ export default {
 		 */
 		hasExpirationDate: {
 			get() {
+				const isDefaultExpireDateEnabled = this.config.isDefaultExpireDateEnabled
+				const hasExistingExpirationDate = !!this.share.expireDate || isDefaultExpireDateEnabled
+				const isDefaultInternalExpireDateEnabled = this.config.isDefaultInternalExpireDateEnabled
+				const isDefaultRemoteExpireDateEnabled = this.config.isDefaultRemoteExpireDateEnabled
 				if (this.isPublicShare) {
-					return !!this.share.expireDate || this.config.isDefaultExpireDateEnforced
+					return hasExistingExpirationDate
 				}
+
 				if (this.isRemoteShare) {
-					return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced || this.config.isDefaultExpireDateEnforced
+					return hasExistingExpirationDate || isDefaultRemoteExpireDateEnabled
 				}
-				return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced || this.config.isDefaultExpireDateEnforced
+
+				return hasExistingExpirationDate || isDefaultInternalExpireDateEnabled
 			},
 			set(enabled) {
 				this.share.expireDate = enabled

File diff suppressed because it is too large
+ 0 - 0
dist/3609-3609.js


File diff suppressed because it is too large
+ 0 - 0
dist/3609-3609.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/50-50.js


File diff suppressed because it is too large
+ 0 - 0
dist/50-50.js.map


File diff suppressed because it is too large
+ 1 - 0
dist/520-520.js


+ 0 - 0
dist/5329-5329.js.LICENSE.txt → dist/520-520.js.LICENSE.txt


File diff suppressed because it is too large
+ 0 - 0
dist/520-520.js.map


File diff suppressed because it is too large
+ 0 - 1
dist/5329-5329.js


File diff suppressed because it is too large
+ 0 - 0
dist/5329-5329.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/5912-5912.js


File diff suppressed because it is too large
+ 0 - 0
dist/5912-5912.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/6678-6678.js


File diff suppressed because it is too large
+ 0 - 0
dist/6678-6678.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/6870-6870.js


File diff suppressed because it is too large
+ 0 - 0
dist/6870-6870.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/7816-7816.js


File diff suppressed because it is too large
+ 0 - 0
dist/7816-7816.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/comments-comments-app.js


File diff suppressed because it is too large
+ 0 - 0
dist/comments-comments-app.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/comments-init.js


File diff suppressed because it is too large
+ 0 - 0
dist/comments-init.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/core-common.js


+ 2 - 16
dist/core-common.js.LICENSE.txt

@@ -5,17 +5,6 @@
  * @license  MIT
  */
 
-/*!
- * Sizzle CSS Selector Engine v2.3.10
- * https://sizzlejs.com/
- *
- * Copyright JS Foundation and other contributors
- * Released under the MIT license
- * https://js.foundation/
- *
- * Date: 2023-02-14
- */
-
 /*!
  * The buffer module from node.js, for the browser.
  *
@@ -53,17 +42,14 @@
  */
 
 /*!
- * jQuery JavaScript Library v3.6.4
+ * jQuery JavaScript Library v3.7.1
  * https://jquery.com/
  *
- * Includes Sizzle.js
- * https://sizzlejs.com/
- *
  * Copyright OpenJS Foundation and other contributors
  * Released under the MIT license
  * https://jquery.org/license
  *
- * Date: 2023-03-08T15:28Z
+ * Date: 2023-08-28T13:37Z
  */
 
 /*!

File diff suppressed because it is too large
+ 0 - 0
dist/core-common.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/core-login.js


File diff suppressed because it is too large
+ 0 - 0
dist/core-login.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/core-main.js


File diff suppressed because it is too large
+ 0 - 0
dist/core-main.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/core-profile.js


File diff suppressed because it is too large
+ 0 - 0
dist/core-profile.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/core-unified-search.js


File diff suppressed because it is too large
+ 0 - 0
dist/core-unified-search.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/core-unsupported-browser-redirect.js


File diff suppressed because it is too large
+ 0 - 0
dist/core-unsupported-browser-redirect.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/core-unsupported-browser.js


File diff suppressed because it is too large
+ 0 - 0
dist/core-unsupported-browser.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/dav-settings-personal-availability.js


File diff suppressed because it is too large
+ 0 - 0
dist/dav-settings-personal-availability.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/federatedfilesharing-vue-settings-admin.js


File diff suppressed because it is too large
+ 0 - 0
dist/federatedfilesharing-vue-settings-admin.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/federatedfilesharing-vue-settings-personal.js


File diff suppressed because it is too large
+ 0 - 0
dist/federatedfilesharing-vue-settings-personal.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files-init.js


File diff suppressed because it is too large
+ 0 - 0
dist/files-init.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files-main.js


File diff suppressed because it is too large
+ 0 - 0
dist/files-main.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files-personal-settings.js


File diff suppressed because it is too large
+ 0 - 0
dist/files-personal-settings.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files-reference-files.js


File diff suppressed because it is too large
+ 0 - 0
dist/files-reference-files.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files-sidebar.js


File diff suppressed because it is too large
+ 0 - 0
dist/files-sidebar.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files_external-init.js


File diff suppressed because it is too large
+ 0 - 0
dist/files_external-init.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files_reminders-main.js


File diff suppressed because it is too large
+ 0 - 0
dist/files_reminders-main.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files_sharing-files_sharing_tab.js


File diff suppressed because it is too large
+ 0 - 0
dist/files_sharing-files_sharing_tab.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files_sharing-init.js


File diff suppressed because it is too large
+ 0 - 0
dist/files_sharing-init.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files_sharing-personal-settings.js


File diff suppressed because it is too large
+ 0 - 0
dist/files_sharing-personal-settings.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files_trashbin-main.js


File diff suppressed because it is too large
+ 0 - 0
dist/files_trashbin-main.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/files_versions-files_versions.js


File diff suppressed because it is too large
+ 0 - 0
dist/files_versions-files_versions.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/settings-apps-view-7418.js


File diff suppressed because it is too large
+ 0 - 0
dist/settings-apps-view-7418.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-admin-basic-settings.js


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-admin-basic-settings.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-admin-delegation.js


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-admin-delegation.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-admin-security.js


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-admin-security.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-apps-users-management.js


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-apps-users-management.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-personal-info.js


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-personal-info.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-personal-password.js


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-personal-password.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-personal-security.js


File diff suppressed because it is too large
+ 0 - 0
dist/settings-vue-settings-personal-security.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/sharebymail-vue-settings-admin-sharebymail.js


File diff suppressed because it is too large
+ 0 - 0
dist/sharebymail-vue-settings-admin-sharebymail.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/systemtags-init.js


File diff suppressed because it is too large
+ 0 - 0
dist/systemtags-init.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/theming-personal-theming.js


File diff suppressed because it is too large
+ 0 - 0
dist/theming-personal-theming.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/updatenotification-updatenotification.js


File diff suppressed because it is too large
+ 0 - 0
dist/updatenotification-updatenotification.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/user_status-menu.js


File diff suppressed because it is too large
+ 0 - 0
dist/user_status-menu.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/weather_status-weather-status.js


File diff suppressed because it is too large
+ 0 - 0
dist/weather_status-weather-status.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/workflowengine-workflowengine.js


File diff suppressed because it is too large
+ 0 - 0
dist/workflowengine-workflowengine.js.map


Some files were not shown because too many files changed in this diff