Skip to content

Commit

Permalink
Merge branch 'main' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
daryllimyt committed Jan 9, 2025
2 parents 1bad625 + 628b900 commit 1c393ed
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/auth/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function SignIn({ className }: React.HTMLProps<HTMLDivElement>) {
</CardHeader>
<CardContent className="flex-col space-y-2">
{showBasicAuth && <BasicLoginForm />}
{(showGoogleOauthAuth || showSamlAuth) && (
{showBasicAuth && (showGoogleOauthAuth || showSamlAuth) && (
<div className="relative">
<div className="absolute inset-0 flex items-center">
<span className="w-full border-t" />
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_organization_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ async def test_update_auth_settings(
test_params = AuthSettingsUpdate(
auth_basic_enabled=True,
auth_require_email_verification=True,
auth_allowed_email_domains={"test.com"},
auth_allowed_email_domains=["test.com"],
auth_min_password_length=16,
auth_session_expire_time_seconds=3600,
)
Expand Down
3 changes: 0 additions & 3 deletions tracecat/auth/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from tracecat.api.common import bootstrap_role
from tracecat.auth.credentials import RoleACL
from tracecat.auth.enums import AuthType
from tracecat.logger import logger
from tracecat.settings.constants import AUTH_TYPE_TO_SETTING_KEY
from tracecat.settings.service import get_setting
from tracecat.types.auth import Role
Expand Down Expand Up @@ -36,9 +35,7 @@ async def _check_auth_type_enabled() -> None:
)
# 2. Check that the setting is enabled
key = AUTH_TYPE_TO_SETTING_KEY[auth_type]
logger.warning("Checking auth type enabled", key=key)
setting = await get_setting(key=key, role=bootstrap_role())
logger.warning("Setting", setting=setting)
if setting is None or not isinstance(setting, bool):
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
Expand Down

0 comments on commit 1c393ed

Please sign in to comment.