mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-01 23:44:47 +00:00
Show organizations in admin panel, implement reload templates option
This commit is contained in:
parent
a797459560
commit
bfd93e5b13
5 changed files with 56 additions and 9 deletions
|
@ -49,7 +49,7 @@ impl AdminTemplateData {
|
|||
}
|
||||
|
||||
fn render(self) -> Result<String, Error> {
|
||||
CONFIG.templates.render("admin/base", &self).map_err(Into::into)
|
||||
CONFIG.render_template("admin/base", &self)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ struct LoginForm {
|
|||
fn post_admin_login(data: Form<LoginForm>, mut cookies: Cookies, ip: ClientIp) -> Result<Redirect, Flash<Redirect>> {
|
||||
let data = data.into_inner();
|
||||
|
||||
// If the token is invalid, redirect to login page
|
||||
if !_validate_token(&data.token) {
|
||||
error!("Invalid admin token. IP: {}", ip.ip);
|
||||
Err(Flash::error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue