Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle revoked oauth permissions by the user (#4074)
* Handle general oauth services errors This is a way to protect ourselves from random errors when syncing OAuth services (create repository/organizations). If a global exception is raised, we just skip this service and continue with the rest of the connected ones. * Handle revoked oauth permissions by the user If the user revoked our app permission from the external service web page, we are not notified. So, next time we try to use it, we will receive a 401 status code in the first request. Here we handle this case and we show a Persistent Notification to the user so he/she knows that a reconnection of the account is needed. * Remove unnecessary exception handling * Style * Add a user persistent notification when social access is revoked * Raise an Exception when permissions revoked Raise a simple Exception when the permissions from a particular social service are revoked instead of using a persistent notification. We want an Exception because it's immediately communicated using the PublicTask mechanism. Otherwise, the user needs to refresh the page to see the notification. * Remove invalid imports * Improve comment * Add final dot to the phrase * Remove unused return
- Loading branch information
Showing
3 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters