Skip to content

Commit

Permalink
Add frontend check even if you don't have a modal key
Browse files Browse the repository at this point in the history
  • Loading branch information
brilee committed Feb 16, 2024
1 parent 71b6239 commit dade5df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lilac/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dade5df

Please sign in to comment.