Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v16] Show device trust status in Connect (#49578)
* Show device trust status in Connect (#49508) * Check if device is trusted * Move `TrustedDeviceRequirement` enum to a separate file and generate TS definitions for it Generating TS definitions for the entire legacy/types/types.proto would result in 50K lines of generated code, and the bundle size would increase by ~20% (around 1 MB). * Extract function to calculate device trust requirement that can be used both by the server and the client Important: it now uses `GetEnforcementMode` instead of `GetEffectiveMode`. The check for OSS module is performed on the server-side anyway. * Check what is device trust requirement based on cluster config and user roles * Show device trust status in UI * Remove `types.` prefix * Improve godocs * Bring back `getRoles func() ([]types.Role, error)` * Simplify `TestHasDeviceTrustExtensions` * Clean up and improve `TestCalculateTrustedDeviceRequirement` * Move `CalculateTrustedDeviceRequirement` and tests to a separate file * Add colors to shield icons * Declare variables where they are used * Extract a component to display device trust status for better readability * Correctly reference `lib/client.ProfileStatus.Extensions` * Set group limit to 8 * Make `switch` exhaustive * Regenerate protos * `make fix-license` (cherry picked from commit 095b0a3) * Remove unsupported property from stories
- Loading branch information