discourse/app/assets/javascripts
Dan Ungureanu 03ad88f2c2
FIX: Add errors field if group update confirmation (#16260)
* FIX: Redirect if Discourse-Xhr-Redirect is present

`handleRedirect` was passed an wrong argument type (a string) instead of
a jqXHR object and missed the fields checked in condition, thus always
evaluating to `false`.

* FIX: Add `errors` field if group update confirmation

An explicit confirmation about the effect of the group update is
required if the default notification level changes. Previously, if the
confirmation was missing the API endpoint failed silently returning
a 200 response code and a `user_count` field. This change ensures that
a proper error code is returned (422), a descriptive error message and
the additional information in the `user_count` field.

This commit also refactors the API endpoint to use the
`Discourse-Xhr-Redirect` header to redirect the user if the group is
no longer visible.
2022-03-24 14:50:44 +02:00
..
admin FIX: remove racing requests for admin users (#15936) 2022-03-16 08:47:48 -05:00
confirm-new-email DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
discourse FIX: Add errors field if group update confirmation (#16260) 2022-03-24 14:50:44 +02:00
discourse-common DEV: Update Uppy to 2.1.6 (#16227) 2022-03-23 09:28:55 -04:00
discourse-hbr PERF: Update ember-auto-import and webpack (#15919) 2022-02-14 11:21:39 +00:00
discourse-widget-hbs PERF: Update ember-auto-import and webpack (#15919) 2022-02-14 11:21:39 +00:00
docs DEV: enforces eslint’s curly rule to the codebase (#10720) 2020-09-22 16:28:28 +02:00
ember-addons DEV: Remove ember-addons (#9559) 2020-04-28 10:14:49 -04:00
locales DEV: Add count to missing translation strings (#15509) 2022-01-09 23:10:32 +01:00
pretty-text DEV: Use Map() to store emoji groups (#16065) 2022-03-05 18:58:49 +01:00
select-kit FIX: Allow admins to change user ignore list (#16129) 2022-03-09 14:51:30 +10:00
truth-helpers PERF: Update ember-auto-import and webpack (#15919) 2022-02-14 11:21:39 +00:00
wizard DEV: Disallow Ember global usage (#16147) 2022-03-09 17:54:07 +01:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
activate-account.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
admin-plugins.js.erb FIX: When using Ember CLI, plugin admin code was not being loaded in tests (#16239) 2022-03-21 15:46:41 -04:00
admin.js FIX: When using Ember CLI, plugin admin code was not being loaded in tests (#16239) 2022-03-21 15:46:41 -04:00
app-boot.js DEV: Disallow Ember global usage (#16147) 2022-03-09 17:54:07 +01:00
application.js DEV: Make screen-track a regular service (#14983) 2021-11-17 20:56:06 +01:00
auto-redirect.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
browser-detect.js FIX: Add replaceAll to browser-detect (#16248) 2022-03-22 11:45:03 +00:00
browser-update.js FIX: browser-update should work with old browsers (#12436) 2021-03-18 19:09:01 +02:00
discourse-loader.js FIX: Ember test imports, again (#16203) 2022-03-16 17:12:15 +01:00
discourse-shims.js FEATURE: Local chunked uppy backup uploads with a new uploader plugin (#14894) 2021-11-23 08:45:42 +10:00
embed-application.js DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
ember_include.js.erb DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
ember_jquery.js Revert "Revert "DEV: Import MessageBus from message-bus-client instead of globals"" 2020-05-28 08:42:36 -04:00
env.js FIX: attempts to fix an error with EXTEND_PROTOTYPES (#7067) 2019-02-26 11:04:05 +01:00
google-tag-manager.js FEATURE: Implement nonces for Google Tag Manager integration (#12531) 2021-03-26 11:19:31 -04:00
google-universal-analytics-v3.js FEATURE: Add Google Universal Analytics v4 as an option (#11123) 2020-11-06 14:15:36 -06:00
google-universal-analytics-v4.js FEATURE: Add Google Universal Analytics v4 as an option (#11123) 2020-11-06 14:15:36 -06:00
handlebars-shim.js FIX: It seems sometimes shims are evaluated by older JS engines (#11813) 2021-01-22 10:41:01 -05:00
main_include_admin.js DEV: Remove old backup uploader and resumable.js (#15365) 2021-12-21 15:02:10 +10:00
markdown-it-bundle.js REFACTOR: Do not rely on module order for discourse-markdown loading 2020-09-18 13:31:55 -04:00
onpopstate-handler.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
package.json FIX: Make truth-helpers work in Ember CLI (#13044) 2021-05-12 17:52:36 +02:00
polyfills.js DEV: Drop padStart and padEnd polyfills (#16249) 2022-03-22 11:46:13 +00:00
pretty-text-bundle.js FIX: pretty text allow list (#10977) 2020-10-28 13:22:06 +11:00
print-page.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
service-worker.js.erb FIX: Disable service worker proxying in chrome 97-97.0.4692 (#15638) 2022-01-18 19:41:25 +00:00
set-prototype-polyfill.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
start-discourse.js DEV: Avoid using globals (#14909) 2021-11-13 13:10:13 +01:00
template_include.js DEV: Support for import Handlebars from 'handlebars'; (#9600) 2020-04-30 16:41:02 -04:00
test-shims.js FIX: Ember test imports, again (#16203) 2022-03-16 17:12:15 +01:00
vendor-common.js DEV: Drop lodash (#16110) 2022-03-06 18:15:25 +01:00
vendor-theme-tests.js DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
vendor.js DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
widget-runtime.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
wizard-application.js DEV: implements some of ember-truth-helpers (#12667) 2021-04-12 11:40:00 +02:00
wizard-shims.js DEV: Use Uppy in wizard-field-image uploads (#15269) 2021-12-13 15:23:44 +10:00
wizard-start.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
wizard-vendor.js DEV: Remove jQuery UI vendor dependencies (#15700) 2022-01-28 11:21:59 +11:00
yarn.lock DEV: Update Uppy to 2.1.6 (#16227) 2022-03-23 09:28:55 -04:00