Google Calendar: Domain-Wide Delegation support for attendee invitations
Service account can now impersonate a Workspace user (set gcal_impersonate_email in config) to unlock attendee invitations with push notifications. Falls back to silent event creation if impersonation is not configured. Setup required in Google Admin Console: Security → API Controls → Domain-wide delegation → Add service account client_id with scope: https://www.googleapis.com/auth/calendar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -451,11 +451,11 @@ class Pages extends CI_Controller {
|
||||
$workerEventId = null;
|
||||
$ownerEventId = null;
|
||||
if(!empty($worker->google_calendar_id)){
|
||||
$workerEventId = $this->googlecalendar->createEvent($worker->google_calendar_id, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd);
|
||||
$workerEventId = $this->googlecalendar->createEvent($worker->google_calendar_id, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd, $worker->google_calendar_id);
|
||||
}
|
||||
$evelinCalId = $this->config->item('gcal_evelin_calendar_id');
|
||||
if(!empty($evelinCalId)){
|
||||
$ownerEventId = $this->googlecalendar->createEvent($evelinCalId, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd);
|
||||
$ownerEventId = $this->googlecalendar->createEvent($evelinCalId, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd, $evelinCalId);
|
||||
}
|
||||
$this->Service_model->updateBookingCalEvents($newBooking->booking_id, $workerEventId, $ownerEventId);
|
||||
}
|
||||
@@ -873,10 +873,10 @@ class Pages extends CI_Controller {
|
||||
$newWorkerEventId = null;
|
||||
$newOwnerEventId = null;
|
||||
if(!empty($worker->google_calendar_id)){
|
||||
$newWorkerEventId = $this->googlecalendar->createEvent($worker->google_calendar_id, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd);
|
||||
$newWorkerEventId = $this->googlecalendar->createEvent($worker->google_calendar_id, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd, $worker->google_calendar_id);
|
||||
}
|
||||
if(!empty($evelinCalId)){
|
||||
$newOwnerEventId = $this->googlecalendar->createEvent($evelinCalId, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd);
|
||||
$newOwnerEventId = $this->googlecalendar->createEvent($evelinCalId, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd, $evelinCalId);
|
||||
}
|
||||
$this->Service_model->updateBookingCalEvents($booking->booking_id, $newWorkerEventId, $newOwnerEventId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user