mirror of
https://github.com/itflow-org/itflow
synced 2026-12-02 00:59:03 +00:00
Add identity providers for agents and client contacts: Admin, Identity Providers under Integrations adds Microsoft 365, Google Workspace and Nextcloud (OIDC Identity Provider app) sign-in buttons and IMAP mail-password sign-in, each for agents, client contacts or both and for the email domains listed; no account is created by signing in; Microsoft, Google and Nextcloud stand in for ITFlow two-step sign-in while IMAP still asks for the code; a provider can be required, turning off password sign-in on its domains with passkeys and administrator passwords still working; credentials stay locked after a provider or mail password sign-in until the ITFlow password is typed; the client portal Microsoft Entra single sign-on moves to a Microsoft 365 provider keeping its redirect address; database 4.2.5 adds identity_providers and drops the old Entra settings; 26.12.3 changelog entries
This commit is contained in:
@@ -639,7 +639,7 @@ function portalContactRoles(array $row) {
|
||||
|
||||
/**
|
||||
* Give a contact of this client portal access and email them how to sign in -
|
||||
* a link to set their password, or for Microsoft a link to the sign-in page.
|
||||
* a link to set their password, or for an identity provider a link to the sign-in page.
|
||||
* Makes their portal user when they have none, turns it back on when it was
|
||||
* off, and sends the invite again when it is on. $by is the primary contact
|
||||
* doing it. ['ok' => bool, 'error' => why not, 'emailed' => bool].
|
||||
@@ -654,7 +654,7 @@ function portalContactInvite($contact_id, $method, $by) {
|
||||
if (!$contact) {
|
||||
return ['ok' => false, 'error' => "That person isn't here", 'emailed' => false];
|
||||
}
|
||||
if (!isset(portalSignInMethods()[$method])) {
|
||||
if (!isset(portalSignInMethods($contact['contact_email'])[$method])) {
|
||||
$method = 'local';
|
||||
}
|
||||
$name = (string) $contact['contact_name'];
|
||||
@@ -675,7 +675,7 @@ function portalContactInvite($contact_id, $method, $by) {
|
||||
mysqli_query($mysqli, "UPDATE contacts SET contact_user_id = $user_id WHERE contact_id = $contact_id AND contact_client_id = $client_id");
|
||||
}
|
||||
|
||||
// The email - a link to set their password, or for Microsoft the sign-in page (functions/portal.php)
|
||||
// The email - a link to set their password, or for an identity provider the sign-in page (functions/portal.php)
|
||||
$emailed = portalMailInvite($user_id, $by);
|
||||
if (!$emailed && $method !== 'local') {
|
||||
portalPasswordLinkClear($user_id);
|
||||
|
||||
Reference in New Issue
Block a user