mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-17 21:32:17 +02:00
reverse proxy mode for kodi export
This commit is contained in:
@@ -297,4 +297,15 @@ impl ApiProxyConfig {
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
pub fn get_user_credentials(&self,username: &str) -> Option<ProxyUserCredentials> {
|
||||
let result = self.user.iter()
|
||||
.flat_map(|target_user| &target_user.credentials)
|
||||
.find(|credential| credential.username == username)
|
||||
.cloned();
|
||||
if result.is_none() {
|
||||
debug!("Could not find any user {username}");
|
||||
}
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user