feat: key bans #130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/key-bans"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
refactor: introduces
ShortIdtyperefactor(server): minor init process cleanup
Implements: #128
jot mod key bans@ -261,0 +273,4 @@Ban {/// When the ban should expire (unless indefinite)#[arg(short, long, value_parser = parse_to_future_timestamp)]expire: Option<Timestamp>,until?
@ -10,6 +10,177 @@ use crate::cli::out;use crate::conf::Conf;use crate::keys::Keys;/// Get the latest audit log entriesbad docstring
@ -13,0 +96,4 @@}}/// Get the key bansshow?
@ -0,0 +66,4 @@(*self.deny.lock().await).remove(short_id)}/// Determine if the given key_id is allowed to upload to the server*to operate
@ -64,0 +75,4 @@async fn key_unban(&self, short_id: ShortId) -> DatabaseResult<()>;/// Get all key bans from the DBasync fn get_key_bans(&self) -> DatabaseResult<Vec<KeyBan>>;order of defs
@ -459,0 +460,4 @@},None => None,};let adl = match &root_short_id_maybe {adl_maybe
@ -463,3 +486,3 @@// Bind server to port 8000 by defaultlet acceptor =let listener =acceptor
@ -16,0 +20,4 @@debug!(error = err.to_string(), "Failed to decode short_id");return Err(ResponseError::NotFound);}};Can
impl From<ShortId::Error> for ResponseError {}?@ -16,0 +19,4 @@Err(_) => {return Err(ResponseError::NotFound);}};map_err?
@ -161,2 +166,4 @@}#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]pub struct ShortId(String);could use a docstring
@ -163,0 +219,4 @@// full hex pubkeyval = val[2..9].to_string()} else {if vlen != 7 {else if?
WIP: feat: key bansto feat: key bans