[ENG-4149] require login to deploy template
This commit is contained in:
parent
a97c03a703
commit
109c779f7c
@ -1408,6 +1408,15 @@ def validate_and_create_app_using_remote_template(app_name, template, templates)
|
|||||||
"""
|
"""
|
||||||
# If user selects a template, it needs to exist.
|
# If user selects a template, it needs to exist.
|
||||||
if template in templates:
|
if template in templates:
|
||||||
|
from reflex_cli.v2.utils import hosting
|
||||||
|
|
||||||
|
authenticated_token = hosting.authenticated_token()
|
||||||
|
if not authenticated_token or not authenticated_token[0]:
|
||||||
|
console.print(
|
||||||
|
f"Please use `reflex loginv2` to access the '{template}' template."
|
||||||
|
)
|
||||||
|
raise typer.Exit(3)
|
||||||
|
|
||||||
template_url = templates[template].code_url
|
template_url = templates[template].code_url
|
||||||
else:
|
else:
|
||||||
# Check if the template is a github repo.
|
# Check if the template is a github repo.
|
||||||
|
Loading…
Reference in New Issue
Block a user