1 parent
cfc74d9db6
commit
dacdf9c27d
76 files changed
+5209
-741
No files matched your search
+15
-7
@@ -18,19 +18,27 @@ pub const BROWSER_COOKIE: &str = "rustbox_browser";
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct AuthPolicyResponse {
|
||||
remember_me_enabled: bool,
|
||||
remember_me_days: u64,
|
||||
session_timeout_hours: u64,
|
||||
}
|
||||
|
||||
pub async fn auth_policy(Extension(config): Extension<Arc<AppConfig>>) -> Json<AuthPolicyResponse> {
|
||||
Json(AuthPolicyResponse {
|
||||
remember_me_enabled: config.remember_me_enabled,
|
||||
})
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SessionPolicyResponse {
|
||||
pgp_enabled: bool,
|
||||
sieve_enabled: bool,
|
||||
diagnostics_enabled: bool,
|
||||
about_enabled: bool,
|
||||
}
|
||||
|
||||
pub async fn auth_policy(Extension(config): Extension<Arc<AppConfig>>) -> Json<AuthPolicyResponse> {
|
||||
Json(AuthPolicyResponse {
|
||||
remember_me_enabled: config.remember_me_enabled,
|
||||
remember_me_days: config.remember_me_days,
|
||||
session_timeout_hours: config.session_timeout_hours,
|
||||
pub async fn session_policy(
|
||||
Extension(config): Extension<Arc<AppConfig>>,
|
||||
) -> Json<SessionPolicyResponse> {
|
||||
Json(SessionPolicyResponse {
|
||||
pgp_enabled: config.pgp_enabled,
|
||||
sieve_enabled: config.sieve_enabled,
|
||||
diagnostics_enabled: config.diagnostics_enabled,
|
||||
|
||||
Reference in new issue
Block a user