Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2025-03-01 14:57:01 +01:00
Remove OrganizationId guard from get_master_password_policy
Dieser Commit ist enthalten in:
Ursprung
6129214538
Commit
2f4d2daec6
2 geänderte Dateien mit 9 neuen und 4 gelöschten Zeilen
src
|
@ -1880,15 +1880,20 @@ async fn list_policies_token(org_id: OrganizationId, token: &str, mut conn: DbCo
|
|||
}
|
||||
|
||||
// Called during the SSO enrollment.
|
||||
// Cannot use the OrganizationId guard since the Org does not exists.
|
||||
#[get("/organizations/<org_id>/policies/master-password", rank = 1)]
|
||||
fn get_master_password_policy(org_id: OrganizationId, _headers: Headers) -> JsonResult {
|
||||
fn get_master_password_policy(org_id: &str, _headers: Headers) -> JsonResult {
|
||||
let data = match CONFIG.sso_master_password_policy() {
|
||||
Some(policy) => policy,
|
||||
None => "null".to_string(),
|
||||
};
|
||||
|
||||
let policy =
|
||||
OrgPolicy::new(org_id, OrgPolicyType::MasterPassword, CONFIG.sso_master_password_policy().is_some(), data);
|
||||
let policy = OrgPolicy::new(
|
||||
OrganizationId(org_id.to_string()),
|
||||
OrgPolicyType::MasterPassword,
|
||||
CONFIG.sso_master_password_policy().is_some(),
|
||||
data,
|
||||
);
|
||||
|
||||
Ok(Json(policy.to_json()))
|
||||
}
|
||||
|
|
|
@ -1156,7 +1156,7 @@ impl OrganizationApiKey {
|
|||
)]
|
||||
#[deref(forward)]
|
||||
#[from(forward)]
|
||||
pub struct OrganizationId(String);
|
||||
pub struct OrganizationId(pub String);
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
|
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren