mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-27 11:54:52 +02:00
Return forbidden if user is not logged for /ui/is_logged_in. Closes: #119
This commit is contained in:
+6
-2
@@ -50,8 +50,12 @@ pub fn logout(id: Identity) -> HttpResponse {
|
||||
HttpResponse::Ok().finish()
|
||||
}
|
||||
|
||||
pub fn is_logged_in(_auth: Auth) -> HttpResponse {
|
||||
HttpResponse::Ok().finish()
|
||||
pub fn is_logged_in(id: Identity) -> HttpResponse {
|
||||
if id.identity().is_some() {
|
||||
HttpResponse::Ok().finish()
|
||||
} else {
|
||||
HttpResponse::Forbidden()
|
||||
}
|
||||
}
|
||||
|
||||
pub type UserName = String;
|
||||
|
||||
Reference in New Issue
Block a user