From 29d07593f0b2ae70bb4235591fdd2505d21c2d83 Mon Sep 17 00:00:00 2001 From: Ali HAMDI Date: Wed, 9 Aug 2023 12:26:32 +0100 Subject: [PATCH] fix: after a page refresh, events are not pushed to Google Calendar - EXO-65485 (#77) After a page reload, events are not pushed to Google calendar when they are created inside Agenda app. The issue is caused by the fact that after retriving the token from storage, the authentication is not redone and the canPush property is not recalculated again. The fix rechecks the permission, of the current user / connector configuration once the token is retrieved . --- .../agenda-connectors/google-connector/agendaGoogleConnector.js | 1 + 1 file changed, 1 insertion(+) diff --git a/agenda-connectors-webapp/src/main/webapp/vue-app/agenda-connectors/google-connector/agendaGoogleConnector.js b/agenda-connectors-webapp/src/main/webapp/vue-app/agenda-connectors/google-connector/agendaGoogleConnector.js index a0f6cdc0..0490da3a 100644 --- a/agenda-connectors-webapp/src/main/webapp/vue-app/agenda-connectors/google-connector/agendaGoogleConnector.js +++ b/agenda-connectors-webapp/src/main/webapp/vue-app/agenda-connectors/google-connector/agendaGoogleConnector.js @@ -336,6 +336,7 @@ function checkUserStatus(connector) { getStoredToken().then(token => { if (connector.user && token?.access_token) { connector.isSignedIn = true; + connector.canPush = connector.cientOauth.hasGrantedAllScopes(token, connector.SCOPE_WRITE); } }); }