Merge pull request #2019 from overleaf/jel-remove-oauth-migration

Remove unused OAuth link/unlink migration

GitOrigin-RevId: 20fce5a714f5897a1b5a93a65156f5368f2d1c65
This commit is contained in:
Timothée Alby 2019-07-31 10:23:30 +02:00 committed by sharelatex
parent b9ab0edf69
commit ef9b487a60
5 changed files with 4 additions and 46 deletions

View file

@ -43,20 +43,4 @@ mixin providerList()
.col-xs-12
h3.text-capitalize#linked-accounts #{translate("linked_accounts")}
p.small #{translate("linked_accounts_explained", {appName:'{{settings.appName}}'})}
if !settings.oauthUseV2
div.text-center(ng-if="ui.isLoadingV1Ids")
i.fa.fa-fw.fa-spin.fa-refresh(aria-hidden="true")
|  #{translate("loading")}...
div(ng-if="ui.isLoadingV1Ids == false && ui.hasError == false")
+providerList()
.alert.alert-danger(
ng-if="ui.hasError"
)
i.fa.fa-fw.fa-exclamation-triangle(aria-hidden="true")
span(ng-if="!ui.errorMessage")  #{translate("error_performing_request")}
span(ng-if="ui.errorMessage")  {{ui.errorMessage}}
else
+providerList()
+providerList()

View file

@ -31,7 +31,6 @@ define([
'main/affiliations/components/affiliationForm',
'main/affiliations/controllers/UserAffiliationsController',
'main/affiliations/factories/UserAffiliationsDataService',
'main/oauth/factories/UserOauthDataService',
'main/oauth/controllers/UserOauthController',
'main/keys',
'main/importing',

View file

@ -19,8 +19,7 @@ define(['base'], function(App) {
$http,
$modal,
event_tracking,
UserAffiliationsDataService,
UserOauthDataService
UserAffiliationsDataService
) {
$scope.subscribed = true

View file

@ -1,16 +1,9 @@
define(['base'], App =>
App.controller('UserOauthController', function(
$http,
$scope,
$q,
_,
UserOauthDataService
) {
App.controller('UserOauthController', function($http, $scope, $q) {
const _reset = function() {
$scope.ui = {
hasError: false,
errorMessage: '',
isLoadingV1Ids: false
errorMessage: ''
}
$scope.providers = window.oauthProviders
$scope.thirdPartyIds = window.thirdPartyIds

View file

@ -1,17 +0,0 @@
define(['base'], function(App) {
return App.factory('UserOauthDataService', function($http) {
const getUserOauthV1 = () => {
if (window.ExposedSettings.isOverleaf) {
return $http.get('/user/v1-oauth-uids').then(response => {
return response.data
})
} else {
return {}
}
}
return {
getUserOauthV1
}
})
})