diff --git a/Makefile b/Makefile index 4166e60b8..77f670005 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Version of LRS Admin UI to use -LRS_ADMIN_UI_VERSION ?= v0.1.20 +LRS_ADMIN_UI_VERSION ?= v0.1.21 LRS_ADMIN_UI_LOCATION ?= https://github.com/yetanalytics/lrs-admin-ui/releases/download/${LRS_ADMIN_UI_VERSION}/lrs-admin-ui.zip LRS_ADMIN_ZIPFILE ?= lrs-admin-ui-${LRS_ADMIN_UI_VERSION}.zip diff --git a/doc/endpoints.md b/doc/endpoints.md index 32f77557e..29bbcf557 100644 --- a/doc/endpoints.md +++ b/doc/endpoints.md @@ -41,7 +41,7 @@ The response body contains a newly generated JSON Web Token (JWT) on success. A #### Misc Admin Routes -- `GET http://example.org/admin/env`: Get select environment variables about the configuration which may aid in client-side operations. Currently returns a map containing the configuration variables `urlPrefix` and `enableStmtHtml`. +- `GET http://example.org/admin/env`: Get select environment variables about the configuration which may aid in client-side operations. - `DELETE http://example.org/admin/agents`: Runs a *hard delete* of all records of an actor, and associated records (statements, attachments, etc). Intended for privacy purposes like GDPR. Body should be a JSON object of form `{"actor-ifi":}`. Disabled unless the configuration variable enableAdminDeleteActor to be set to `true`. ### Reaction Management Routes diff --git a/doc/env_vars.md b/doc/env_vars.md index bf8e95aa5..6ed85f194 100644 --- a/doc/env_vars.md +++ b/doc/env_vars.md @@ -201,7 +201,7 @@ These config vars enable and configure browser security response headers from th | `LRSQL_ENABLE_ADMIN_DELETE_ACTOR` | `enableAdminDeleteActor` | Whether or not to enable the route and UI for deleting actors and related documents | `false` | | `LRSQL_ENABLE_ADMIN_UI` | `enableAdminUi` | Whether or not to serve the administrative UI at `/admin` | `true` | | `LRSQL_ENABLE_ADMIN_STATUS` | `enableAdminStatus` | Whether or not to serve admin system status data that queries the database. | `true` | -| `LRSQL_ENABLE_STMT_HTML` | `enableStmtHtml` | Whether or not HTML data is returned in the LRS HTTP response. If `false` disables HTML rendering even if `LRSQL_ENABLE_ADMIN_UI` is `true`. In that case the UI will not display the Statement Browser feature. | `true` | +| `LRSQL_ENABLE_STMT_HTML` | `enableStmtHtml` | Whether or not HTML data is returned in the LRS HTTP response if the Accept type is specified as text/html. If `false` disables HTML rendering regardless of Accept type. | `true` | | `LRSQL_ADMIN_LANGUAGE` | `adminLanguage` | Allows override of default RFC5646 language code (`en-US`). May require that you add new language map entries to `resources/lrsql/localization/language.json` to add a new language. | `en-US` | [<- Back to Index](index.md) diff --git a/src/main/lrsql/admin/interceptors/ui.clj b/src/main/lrsql/admin/interceptors/ui.clj index 4786101ad..565dcf238 100644 --- a/src/main/lrsql/admin/interceptors/ui.clj +++ b/src/main/lrsql/admin/interceptors/ui.clj @@ -33,7 +33,6 @@ :enter (fn get-env [ctx] (let [{url-prefix ::i/path-prefix - enable-stmt-html ::i/statement-html? oidc-env ::oidc-i/admin-env} ctx] (assoc ctx :response @@ -42,7 +41,6 @@ (merge (cond-> {:url-prefix url-prefix :proxy-path proxy-path - :enable-stmt-html (some? enable-stmt-html) :enable-admin-delete-actor enable-admin-delete-actor :enable-admin-status enable-admin-status :enable-reactions enable-reactions diff --git a/src/test/lrsql/admin/route_test.clj b/src/test/lrsql/admin/route_test.clj index 5c1bcce2a..8ec278a5b 100644 --- a/src/test/lrsql/admin/route_test.clj +++ b/src/test/lrsql/admin/route_test.clj @@ -142,8 +142,7 @@ (let [{:keys [status body]} (get-env content-type) edn-body (u/parse-json body)] (is (= 200 status)) - (is (= (get edn-body "url-prefix") "/xapi")) - (is (= (get edn-body "enable-stmt-html") true)))) + (is (= (get edn-body "url-prefix") "/xapi")))) (testing "create account with username `myname` and password `swordfish`" (let [{:keys [status body]} (create-account headers req-body)