diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index a3c10a8cf..36156f1ea 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -40,6 +40,7 @@ - Daniil Egortsev (playhardgopro) - Anton Loukianov (antonl) - fossdd +- Wei Jian Gan (weijiangan) ## Acknowledgements diff --git a/server/core/src/https/views/apps.rs b/server/core/src/https/views/apps.rs index 2dd87c4d4..ab867d3d7 100644 --- a/server/core/src/https/views/apps.rs +++ b/server/core/src/https/views/apps.rs @@ -5,7 +5,6 @@ use axum::{ response::{IntoResponse, Response}, Extension, }; -use axum_htmx::extractors::HxRequest; use axum_htmx::HxPushUrl; use kanidm_proto::internal::AppLink; @@ -29,7 +28,6 @@ struct AppsPartialView { pub(crate) async fn view_apps_get( State(state): State, Extension(kopid): Extension, - HxRequest(hx_request): HxRequest, VerifiedClientInformation(client_auth_info): VerifiedClientInformation, ) -> axum::response::Result { // Because this is the route where the login page can land, we need to actually alter @@ -44,16 +42,12 @@ pub(crate) async fn view_apps_get( let apps_partial = AppsPartialView { apps: app_links }; - Ok(if hx_request { + Ok({ + let apps_view = AppsView { apps_partial }; ( - // On the redirect during a login we don't push urls. We set these headers - // so that the url is updated, and we swap the correct element. HxPushUrl(Uri::from_static("/ui/apps")), - HtmlTemplate(apps_partial), + HtmlTemplate(apps_view).into_response(), ) .into_response() - } else { - let apps_view = AppsView { apps_partial }; - HtmlTemplate(apps_view).into_response() }) } diff --git a/server/core/templates/cred_update/add_password_partial.html b/server/core/templates/cred_update/add_password_partial.html index 2c76f9785..8727ac389 100644 --- a/server/core/templates/cred_update/add_password_partial.html +++ b/server/core/templates/cred_update/add_password_partial.html @@ -50,7 +50,7 @@
- + + - (% else %) - - - - (% endif %) +
+ (% if can_rw %) + + (% else %) + + + + (% endif %) +
+ + (% endblock %)