Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- Hide version upgrade toast for askgithub deployment (`EXPERIMENT_ASK_GH_ENABLED`). [#931](https://github.com/sourcebot-dev/sourcebot/pull/931)
- Hide security notice on login and signup pages when `EXPERIMENT_ASK_GH_ENABLED` is enabled. [#943](https://github.com/sourcebot-dev/sourcebot/pull/943)

### Fixed
- Fixed text inside angle brackets (e.g., `<id>`) being hidden in chat prompt display due to HTML parsing. [#929](https://github.com/sourcebot-dev/sourcebot/pull/929) [#932](https://github.com/sourcebot-dev/sourcebot/pull/932)
Expand Down
4 changes: 3 additions & 1 deletion packages/web/src/app/login/components/loginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ interface LoginFormProps {
providers: IdentityProviderMetadata[];
context: "login" | "signup";
isAnonymousAccessEnabled?: boolean;
hideSecurityNotice?: boolean;
}

export const LoginForm = ({ callbackUrl, error, providers, context, isAnonymousAccessEnabled = false }: LoginFormProps) => {
export const LoginForm = ({ callbackUrl, error, providers, context, isAnonymousAccessEnabled = false, hideSecurityNotice = false }: LoginFormProps) => {
const captureEvent = useCaptureEvent();

const safeCallbackUrl = useMemo(() => {
Expand Down Expand Up @@ -89,6 +90,7 @@ export const LoginForm = ({ callbackUrl, error, providers, context, isAnonymousA
context={context}
onProviderClick={handleProviderClick}
securityNoticeClosable={true}
hideSecurityNotice={hideSecurityNotice}
/>
<p className="text-sm text-muted-foreground mt-8">
{context === "login" ?
Expand Down
2 changes: 2 additions & 0 deletions packages/web/src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { getOrgFromDomain } from "@/data/org";
import { SINGLE_TENANT_ORG_DOMAIN } from "@/lib/constants";
import { getAnonymousAccessStatus } from "@/actions";
import { isServiceError } from "@/lib/utils";
import { env } from "@sourcebot/shared";

interface LoginProps {
searchParams: Promise<{
Expand Down Expand Up @@ -40,6 +41,7 @@ export default async function Login(props: LoginProps) {
providers={providers}
context="login"
isAnonymousAccessEnabled={isAnonymousAccessEnabled}
hideSecurityNotice={env.EXPERIMENT_ASK_GH_ENABLED === 'true'}
/>
</div>
<Footer />
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/app/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LoginForm } from "../login/components/loginForm";
import { redirect } from "next/navigation";
import { Footer } from "@/app/components/footer";
import { getIdentityProviderMetadata } from "@/lib/identityProviders";
import { createLogger } from "@sourcebot/shared";
import { createLogger, env } from "@sourcebot/shared";
import { getOrgFromDomain } from "@/data/org";
import { SINGLE_TENANT_ORG_DOMAIN } from "@/lib/constants";
import { getAnonymousAccessStatus } from "@/actions";
Expand Down Expand Up @@ -44,6 +44,7 @@ export default async function Signup(props: LoginProps) {
providers={providers}
context="signup"
isAnonymousAccessEnabled={isAnonymousAccessEnabled}
hideSecurityNotice={env.EXPERIMENT_ASK_GH_ENABLED === 'true'}
/>
</div>
<Footer />
Expand Down