mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Avoid suggesting blacklisted emails as university domains.
This commit is contained in:
parent
76d8ab11e5
commit
3e0ad47873
2 changed files with 2 additions and 3 deletions
|
@ -26,7 +26,6 @@ define [
|
||||||
$scope.ui.showManualUniversitySelectionUI = false
|
$scope.ui.showManualUniversitySelectionUI = false
|
||||||
if userInputLocalAndDomain.domain?
|
if userInputLocalAndDomain.domain?
|
||||||
$scope.ui.isBlacklistedEmail = UserAffiliationsDataService.isDomainBlacklisted userInputLocalAndDomain.domain
|
$scope.ui.isBlacklistedEmail = UserAffiliationsDataService.isDomainBlacklisted userInputLocalAndDomain.domain
|
||||||
|
|
||||||
UserAffiliationsDataService.getUniversityDomainFromPartialDomainInput(userInputLocalAndDomain.domain)
|
UserAffiliationsDataService.getUniversityDomainFromPartialDomainInput(userInputLocalAndDomain.domain)
|
||||||
.then (universityDomain) ->
|
.then (universityDomain) ->
|
||||||
currentUserInputLocalAndDomain = _matchLocalAndDomain $scope.newAffiliation.email
|
currentUserInputLocalAndDomain = _matchLocalAndDomain $scope.newAffiliation.email
|
||||||
|
@ -44,7 +43,7 @@ define [
|
||||||
else
|
else
|
||||||
$scope.newAffiliation.university = null
|
$scope.newAffiliation.university = null
|
||||||
$scope.newAffiliation.department = null
|
$scope.newAffiliation.department = null
|
||||||
$q.resolve null
|
$q.reject null
|
||||||
|
|
||||||
$scope.handleEmailInputBlur = () ->
|
$scope.handleEmailInputBlur = () ->
|
||||||
# if $scope.newAffiliation.autoDetectMode and !$scope.newAffiliation.university and $scope.newAffiliation.email?.match EMAIL_REGEX
|
# if $scope.newAffiliation.autoDetectMode and !$scope.newAffiliation.university and $scope.newAffiliation.email?.match EMAIL_REGEX
|
||||||
|
|
|
@ -39,7 +39,7 @@ define [
|
||||||
$http.get "/institutions/domains" , { params: { hostname: partialDomainInput, limit: 1 } }
|
$http.get "/institutions/domains" , { params: { hostname: partialDomainInput, limit: 1 } }
|
||||||
.then (response) ->
|
.then (response) ->
|
||||||
university = response.data[0]
|
university = response.data[0]
|
||||||
if university?
|
if university? and !isDomainBlacklisted university.hostname
|
||||||
universitiesByDomain[university.hostname] = university
|
universitiesByDomain[university.hostname] = university
|
||||||
$q.resolve university
|
$q.resolve university
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue