mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Avoid suggesting blacklisted emails as university domains.
This commit is contained in:
+1
-2
@@ -26,7 +26,6 @@ define [
|
||||
$scope.ui.showManualUniversitySelectionUI = false
|
||||
if userInputLocalAndDomain.domain?
|
||||
$scope.ui.isBlacklistedEmail = UserAffiliationsDataService.isDomainBlacklisted userInputLocalAndDomain.domain
|
||||
|
||||
UserAffiliationsDataService.getUniversityDomainFromPartialDomainInput(userInputLocalAndDomain.domain)
|
||||
.then (universityDomain) ->
|
||||
currentUserInputLocalAndDomain = _matchLocalAndDomain $scope.newAffiliation.email
|
||||
@@ -44,7 +43,7 @@ define [
|
||||
else
|
||||
$scope.newAffiliation.university = null
|
||||
$scope.newAffiliation.department = null
|
||||
$q.resolve null
|
||||
$q.reject null
|
||||
|
||||
$scope.handleEmailInputBlur = () ->
|
||||
# if $scope.newAffiliation.autoDetectMode and !$scope.newAffiliation.university and $scope.newAffiliation.email?.match EMAIL_REGEX
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ define [
|
||||
$http.get "/institutions/domains" , { params: { hostname: partialDomainInput, limit: 1 } }
|
||||
.then (response) ->
|
||||
university = response.data[0]
|
||||
if university?
|
||||
if university? and !isDomainBlacklisted university.hostname
|
||||
universitiesByDomain[university.hostname] = university
|
||||
$q.resolve university
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user