From dade5dfaefcef408ceac42da8bc181c90e5845d1 Mon Sep 17 00:00:00 2001 From: Brian Lee Date: Fri, 16 Feb 2024 17:00:10 -0500 Subject: [PATCH] Add frontend check even if you don't have a modal key --- lilac/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lilac/auth.py b/lilac/auth.py index a4a0b450a..8cdb90673 100644 --- a/lilac/auth.py +++ b/lilac/auth.py @@ -79,6 +79,9 @@ class AuthenticationInfo(BaseModel): def has_garden_credentials() -> bool: """Returns whether the user has Garden credentials.""" + # TODO: more granular checks based on user permissions + if env('LILAC_API_KEY') is not None: + return True config = modal.config.Config().to_dict() return ( 'token_secret' in config