mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-23 02:38:11 +03:00
Fix Org identifier (#6364)
* Fix Org identifier * Org invitation default to SSO when SSO_ENABLED
This commit is contained in:
1 parent
e659a61581
commit
8043f7eca7
2 files changed
+7
-5
No files matched your search
@@ -355,9 +355,11 @@ async fn get_auto_enroll_status(identifier: &str, headers: Headers, mut conn: Db
|
||||
|
||||
let (id, identifier, rp_auto_enroll) = match org {
|
||||
None => (get_uuid(), identifier.to_string(), false),
|
||||
Some(org) => {
|
||||
(org.uuid.to_string(), org.name, OrgPolicy::org_is_reset_password_auto_enroll(&org.uuid, &mut conn).await)
|
||||
}
|
||||
Some(org) => (
|
||||
org.uuid.to_string(),
|
||||
org.uuid.to_string(),
|
||||
OrgPolicy::org_is_reset_password_auto_enroll(&org.uuid, &mut conn).await,
|
||||
),
|
||||
};
|
||||
|
||||
Ok(Json(json!({
|
||||
|
||||
+2
-2
@@ -302,9 +302,9 @@ pub async fn send_invite(
|
||||
.append_pair("organizationUserId", &member_id)
|
||||
.append_pair("token", &invite_token);
|
||||
|
||||
if CONFIG.sso_enabled() && CONFIG.sso_only() {
|
||||
if CONFIG.sso_enabled() {
|
||||
query_params.append_pair("orgUserHasExistingUser", "false");
|
||||
query_params.append_pair("orgSsoIdentifier", org_name);
|
||||
query_params.append_pair("orgSsoIdentifier", &org_id);
|
||||
} else if user.private_key.is_some() {
|
||||
query_params.append_pair("orgUserHasExistingUser", "true");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user