mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 00:07:21 -06:00
This should re-allow anonymous users on systems that have that permission set.
This commit is contained in:
parent
6609f397eb
commit
564c266792
@ -80,7 +80,15 @@ pub async fn auth_layer(
|
||||
req.extensions_mut().insert(login_result);
|
||||
Ok(next.run(req).await)
|
||||
}
|
||||
LoginResult::Denied => Err(Html(BOUNCE)),
|
||||
LoginResult::Denied => {
|
||||
let users = WebUsers::load_or_create().unwrap();
|
||||
if users.do_we_allow_anonymous() {
|
||||
req.extensions_mut().insert(LoginResult::ReadOnly);
|
||||
Ok(next.run(req).await)
|
||||
} else {
|
||||
Err(Html(BOUNCE))
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
Err(Html(BOUNCE))
|
||||
|
Loading…
Reference in New Issue
Block a user