Fix constant name
This commit is contained in:
parent
8fc03d43bc
commit
f28f9dbc5a
@ -34,7 +34,7 @@ impl TokenRights {
|
|||||||
return Some("All API rights shall start with /api/");
|
return Some("All API rights shall start with /api/");
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.path.len() > constants::API_TOKEN_PATH_MAX_LENGTH {
|
if r.path.len() > constants::API_TOKEN_RIGHT_PATH_MAX_LENGTH {
|
||||||
return Some("An API path shall not exceed maximum URL size!");
|
return Some("An API path shall not exceed maximum URL size!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,4 +106,4 @@ pub const API_TOKEN_DESCRIPTION_MIN_LENGTH: usize = 5;
|
|||||||
pub const API_TOKEN_DESCRIPTION_MAX_LENGTH: usize = 30;
|
pub const API_TOKEN_DESCRIPTION_MAX_LENGTH: usize = 30;
|
||||||
|
|
||||||
/// API token right path max length
|
/// API token right path max length
|
||||||
pub const API_TOKEN_PATH_MAX_LENGTH: usize = 255;
|
pub const API_TOKEN_RIGHT_PATH_MAX_LENGTH: usize = 255;
|
||||||
|
@ -114,7 +114,7 @@ pub async fn static_config(local_auth: LocalAuthEnabled) -> impl Responder {
|
|||||||
|
|
||||||
api_token_right_path_size: LenConstraints {
|
api_token_right_path_size: LenConstraints {
|
||||||
min: 0,
|
min: 0,
|
||||||
max: constants::API_TOKEN_PATH_MAX_LENGTH,
|
max: constants::API_TOKEN_RIGHT_PATH_MAX_LENGTH,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user