Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding top-level fields to CLI show and clip commands #8241

Merged
merged 1 commit into from
Aug 20, 2022

Conversation

louib
Copy link
Member

@louib louib commented Jul 5, 2022

Fixes #4112
Preparation work for #4113 and #3720

The top-level fields are currently not accessible from the CLI, which
makes it impossible to select entries or groups based on the UUID.
There are other top-level fields I believe, like the expiry date, but
I only added the two most critical fields for now. I also considered
defining the constants in Entry instead of EntryAttributes, because
they are not attributes per se. I'm not sure which choice is better tbh.

Testing strategy

Updated the unit tests.

Type of change

  • ✅ New feature (change that adds functionality)
  • ✅ Breaking change (causes existing functionality to change)

@louib louib requested review from droidmonkey and phoerious July 5, 2022 13:55
@louib louib changed the title Adding top-level fields to CLI commands Adding top-level fields to CLI show and clip commands Jul 5, 2022
@louib
Copy link
Member Author

louib commented Jul 5, 2022

Note that one consequence of the current implementation is that it won't be possible anymore to select an attribute from the CLI if it has the same name as a top-level field. I feel like this is a fair limitation.

Also, we might consider removing the braces around the UUID. I'm not even sure why they are there in the first place.

@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2022

Codecov Report

Merging #8241 (09df862) into develop (a6d3f97) will decrease coverage by 0.01%.
The diff coverage is 94.12%.

@@             Coverage Diff             @@
##           develop    #8241      +/-   ##
===========================================
- Coverage    64.45%   64.44%   -0.01%     
===========================================
  Files          339      339              
  Lines        43732    43749      +17     
===========================================
+ Hits         28186    28191       +5     
- Misses       15546    15558      +12     
Impacted Files Coverage Δ
src/core/EntryAttributes.cpp 81.18% <ø> (ø)
src/cli/Utils.cpp 75.31% <83.33%> (+0.20%) ⬆️
src/cli/Clip.cpp 95.15% <100.00%> (+0.15%) ⬆️
src/cli/Show.cpp 97.56% <100.00%> (+0.26%) ⬆️
...rc/fdosecrets/widgets/SettingsWidgetFdoSecrets.cpp 56.06% <0.00%> (-3.03%) ⬇️
src/fdosecrets/dbus/DBusMgr.cpp 52.20% <0.00%> (-1.47%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

src/core/EntryAttributes.cpp Outdated Show resolved Hide resolved
@louib louib requested a review from droidmonkey July 7, 2022 17:44
@droidmonkey
Copy link
Member

Need to fix code format then can merge

@louib
Copy link
Member Author

louib commented Jul 30, 2022

@droidmonkey ready to merge, when/if the mac tests ever finish.

@louib louib force-pushed the cli_show_uuid branch 4 times, most recently from 89d562e to 73a6faa Compare August 20, 2022 14:34
The top-level fields are currently not accessible from the CLI, which
makes it impossible to select entries or groups based on the UUID.
There are other top-level fields I believe, like the expiry date,
but I only added the two most critical fields for the moment.
@droidmonkey droidmonkey merged commit aa839e2 into develop Aug 20, 2022
@droidmonkey droidmonkey deleted the cli_show_uuid branch August 20, 2022 22:31
@droidmonkey droidmonkey added this to the v2.7.2 milestone Aug 20, 2022
@droidmonkey droidmonkey added the pr: backport pending Pull request yet to be backported to a previous release label Aug 20, 2022
@droidmonkey droidmonkey added pr: backported Pull request backported to previous release and removed pr: backport pending Pull request yet to be backported to a previous release labels Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: CLI pr: backported Pull request backported to previous release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: display the UUID in the show command
3 participants