Skip to content

feat(auth): implement mandatory legal acceptance and organization compliance. - #161

Merged
ANCIENTINSANE merged 1 commit into
mainfrom
fixes
Feb 16, 2026
Merged

feat(auth): implement mandatory legal acceptance and organization compliance.#161
ANCIENTINSANE merged 1 commit into
mainfrom
fixes

Conversation

@ANCIENTINSANE

Copy link
Copy Markdown
Contributor

feat(auth): implement mandatory legal acceptance and organization compliance

This commit implements a comprehensive legal acceptance flow for both personal and organization accounts, ensuring compliance across the platform.

Key changes:

  • Identity Lifecycle Resolver: Hardened logic to enforce personal legal acceptance for all users and strictly block organization members if their organization has not accepted updated terms.
  • Mandatory Compliance: Enforced mandatory organization-level acceptance for Owners and Admins in both the /accept-legal API and the frontend modal.
  • Performance Optimization: Reduced database reads by 50% in the /api/auth/lifecycle endpoint by consolidating redundant resolver calls.
  • Routing & Guards: Integrated LegalAcceptanceModal into LifecycleGuard to intercept users globally based on compliance status.
  • Client-side State: Adjusted React Query settings in useAccountLifecycle (staleTime: 30s, refetch on focus) to ensure security and compliance status changes are detected promptly.
  • UI Enhancements: Added clear visual indicators for mandatory compliance and refined the member-blocked state UI.

@ANCIENTINSANE
ANCIENTINSANE merged commit e5d900a into main Feb 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant