Skip to content

feat(api/ui): add client enable/disable access control#4771

Open
neatnoise wants to merge 1 commit intoLizardByte:masterfrom
neatnoise:access-control
Open

feat(api/ui): add client enable/disable access control#4771
neatnoise wants to merge 1 commit intoLizardByte:masterfrom
neatnoise:access-control

Conversation

@neatnoise
Copy link

@neatnoise neatnoise commented Feb 24, 2026

Description

Add ability to enable/disable paired clients via the web UI and API. Disabled clients are rejected at the TLS verification level, preventing them from connecting.

Changes:

  • Add enabled boolean field to named_cert_t struct, persisted in client credentials file
  • Add POST /api/clients/update endpoint accepting { "uuid": "<uuid>", "enabled": true/false }
  • Add set_client_enabled() and is_client_enabled() functions in nvhttp
  • Reject disabled clients during TLS certificate verification
  • Add Enable/Disable toggle buttons with status badges in the troubleshooting page client list

This provides basic access control for paired clients without requiring a full unpair/re-pair cycle. Existing clients default to enabled = true for backward compatibility. When the client is disabled the visual behaviour of the Moonlight client is that the PC looks like turned off.

Screenshot

Screenshot 2026-02-24 at 15 35 14

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Add ability to enable/disable paired clients via web UI and API.
Disabled clients are rejected at TLS verification level.

- Add enabled field to named_cert_t struct
- Add /api/clients/update POST endpoint
- Add enable/disable toggle in troubleshooting page
- Persist enabled state in client credentials file
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3 New issues
3 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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