Files
frontend-app-authoring/.env.development
David Joy 904c5d4145 feat: add network connectivity and permission denied alerts (#97)
* refactor: reusable connection error and permission denied alerts

This commit pulls the connection error and permission denied alerts out of ProctoredExamSettings and also makes them Open edX friendly by removing references to “edX” and using the SUPPORT_URL environment variable to supply the support link.

This is in preparation for using these alerts in the Discussions UI.

* refactor: saveAppConfig now responsible for redirect

I’ve moved the redirect to the pages and resources path into the thunk for saveAppConfig.  This is because we only want to do it if the thunk is successful, and it’s easier to do it here than to have `then` and `catch` handlers in the component.  In particular, this is because we can’t stop the `then` from happening unless we throw an error from the thunk, but the component has nothing to do on a thrown error.  This avoids the awkward code in the component and just handles it all here.

* feat: handle access denied by setting DENIED statuses

This takes us one step closer to user messaging for permission denied errors by setting an explicit DENIED status and saveStatus when a request was denied because the user didn’t have permissions.  Note that this is different than a 401, which is unauthorized, meaning the user is logged out.  This doesn’t handle 401s.

Following this, we can then use the DENIED status to give the user feedback on what’s going on.

* feat: adding error alerts

This commit adds friendly error alerts for connection and permission denied errors in the discussions app.

If the initial fetch apps request errors out or is denied, then the entire contents of the modal is replaced with an error message.

If the save app config request errors out, then a message is displayed at the top of the form.

If the sae app config request is denied, the entire contents of the modal is replaced with a permission denied error message, as in the first case.
2021-04-23 14:23:33 -04:00

26 lines
1021 B
Plaintext

NODE_ENV='development'
ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload'
BASE_URL='localhost:2001'
CREDENTIALS_BASE_URL='http://localhost:18150'
CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
DISCOVERY_API_BASE_URL=
ECOMMERCE_BASE_URL='http://localhost:18130'
FAVICON_URL='https://edx-cdn.org/v3/default/favicon.ico'
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference'
LMS_BASE_URL='http://localhost:18000'
LOGIN_URL='http://localhost:18000/login'
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
LOGOUT_URL='http://localhost:18000/logout'
MARKETING_SITE_BASE_URL='http://localhost:18000'
ORDER_HISTORY_URL='localhost:1996/orders'
PORT=2001
PUBLISHER_BASE_URL=
REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh'
SEGMENT_KEY=null
SITE_NAME='edX'
STUDIO_BASE_URL='http://localhost:18010'
SUPPORT_URL='https://support.edx.org'
USER_INFO_COOKIE_NAME='edx-user-info'