1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00

Allow the user log-in, since the URL to suggest a license is restricted

This commit is contained in:
Felipe Lube de Bragança 2018-10-15 09:57:14 -03:00
parent dc0deb0326
commit 2d3c449b36

View File

@ -121,8 +121,9 @@ class LicenseSuggestion
license = repositoryInfo.license license = repositoryInfo.license
@setStatus "Error", @repositoryLicense repositoryFullName, license @setStatus "Error", @repositoryLicense repositoryFullName, license
else # The repository is unlicensed else # The repository is unlicensed
window.location.href = licenseUrl = encodeURIComponent "https://github.com/#{repositoryFullName}/community/license/new?template=#{@licenseId}"
"https://github.com/#{repositoryFullName}/community/license/new?template=#{@licenseId}" # Provide the chance to the user log-in, since the URL to suggest a license is restricted
window.location.href = "https://github.com/login?return_to=#{licenseUrl}"
@setStatus "" @setStatus ""
@inputEl.val("") @inputEl.val("")