Skip to content

Disable local users when LocalAuthDisabled = true#546

Merged
braginini merged 2 commits intomainfrom
feature/disable-local-users
Feb 1, 2026
Merged

Disable local users when LocalAuthDisabled = true#546
braginini merged 2 commits intomainfrom
feature/disable-local-users

Conversation

@braginini
Copy link
Contributor

@braginini braginini commented Jan 31, 2026

Screenshot 2026-01-31 at 16 02 53

Summary by CodeRabbit

  • New Features
    • Added an account setting to disable local authentication.
    • Invite user button now shows an informational tooltip when local authentication is disabled, explaining the state and linking to documentation; when enabled, the button and invite flow behave as before.
    • No changes to public APIs or invite flow.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

Added an optional local_auth_disabled boolean to Account.settings and updated the UsersTable invite flow to disable the invite button and show an explanatory FullTooltip when local authentication is disabled.

Changes

Cohort / File(s) Summary
Account Interface Extension
src/interfaces/Account.ts
Added optional local_auth_disabled?: boolean to Account.settings.
User Invite UI Behavior
src/modules/users/UsersTable.tsx
Introduced localAuthDisabled derived from account settings; compute isDisabled combining permission and localAuthDisabled; render a shared button element and wrap it in FullTooltip (with message and "Learn more" link) when local auth is disabled, otherwise render as before inside UserInviteModal.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A tiny flag, tucked in settings tight,
When local keys sleep, the invite grows light,
A tooltip whispers where invites once flew,
"Learn more" it says, guiding the crew ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a local_auth_disabled flag and disabling the invite user functionality when local authentication is disabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/disable-local-users

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/modules/users/UsersTable.tsx`:
- Around line 352-355: The external InlineLink in UsersTable (usage of
InlineLink with href "https://docs.netbird.io/..." in UsersTable.tsx) opens in a
new tab via target="_blank" but lacks rel="noopener noreferrer"; update that
InlineLink instance to include rel="noopener noreferrer" to prevent reverse
tabnabbing and ensure safe external linking.
- Around line 340-365: The FullTooltip wrapper is forcing "ml-auto" which
overrides caller alignment; update the conditional render where
localAuthDisabled is handled (the FullTooltip around {button} in UsersTable.tsx)
to use the caller-provided className instead of hardcoded "ml-auto" — e.g.,
remove the literal ml-auto and pass through a prop/className variable so
consumers control alignment; ensure FullTooltip still receives any needed
default classes but does not unconditionally apply ml-auto.

@netbirdio netbirdio deleted a comment from coderabbitai bot Jan 31, 2026
@braginini braginini merged commit ea14854 into main Feb 1, 2026
4 checks passed
@braginini braginini deleted the feature/disable-local-users branch February 1, 2026 13:31
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.

2 participants