UI: Hide User Card from config.userCard.enabled option#10545
UI: Hide User Card from config.userCard.enabled option#10545DaanHoogland merged 1 commit intoapache:mainfrom
Conversation
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10545 +/- ##
=========================================
Coverage 16.26% 16.26%
Complexity 13389 13389
=========================================
Files 5674 5674
Lines 498927 498927
Branches 60337 60337
=========================================
+ Hits 81157 81159 +2
+ Misses 408729 408728 -1
+ Partials 9041 9040 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
UI build: ✔️ |
bernardodemarco
left a comment
There was a problem hiding this comment.
lgtm, manually tested it
- I locally ran the UI environment (
npm run start) - Accessed the
ui/public/config.jsonfile and changed theenabledproperty of theuserCardobject fromtruetofalse - Verified that the card was not displayed to end users:

- Changed the
enabledproperty back totrueand verified that the card was correctly displayed to end users:

|
Can we maybe also rename it to |
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to hide the User Card component from the dashboard via a configuration option. The enhancement allows administrators to control whether users can see the User Card, which may contain API documentation or other sensitive information.
- Adds a configurable
enabledproperty to theuserCardconfiguration object - Implements conditional rendering of the User Card component based on the configuration setting
- Defaults to showing the User Card when the configuration is not specified (backwards compatibility)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ui/src/views/dashboard/UsageDashboard.vue | Adds conditional rendering logic to hide/show User Card based on config |
| ui/public/config.json | Adds the enabled property to userCard configuration with default value |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: OlegChuev <o.chuev@mobidev.biz>
Description
This PR makes the User Card toggleable via config.json, which is particularly useful when users shouldn’t be aware of API docs or other information.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
With

"enabled": trueand whenenabledabsent from the config.jsonWith
"enabled": false:How Has This Been Tested?
How did you try to break this feature and the system with this change?