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

UI Hide Secrets Sync from nav if not on license and/or no policy permissions #27262

Merged
merged 24 commits into from
Jun 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
64c2fd0
intial changes, haven't tested client counts or done test coverage
Monkeychip May 29, 2024
931a926
client count rename getter to clairfy
Monkeychip May 29, 2024
ac6b262
fix has-permission api-paths
Monkeychip May 29, 2024
b1ad18f
wip
Monkeychip May 29, 2024
09162c4
wip
Monkeychip May 29, 2024
e67076e
fix: explicitly refresh vault.cluster model to re-fetch activatedFeat…
May 29, 2024
e69075b
tests: fix # of assertions for verifying that activation was called
May 29, 2024
27df01a
tests: tidy overview-test
May 29, 2024
7fc2fd7
add additional api permission path and move fetch back to application
Monkeychip May 30, 2024
36fbb78
add test coverage for the service
Monkeychip May 30, 2024
1f2a88b
Merge branch 'main' into ui/VAULT-27608/hide-secrets-sync-when-no-access
Monkeychip May 30, 2024
462d258
cleanup
Monkeychip May 30, 2024
9f1ab09
remove test that checked for upsell without license or on community
Monkeychip May 30, 2024
e4e1080
small comment change
Monkeychip May 30, 2024
3ec1646
welp missed component getter
Monkeychip May 30, 2024
628ea6b
flaky test fix
Monkeychip May 30, 2024
dccc476
flaky test
Monkeychip May 30, 2024
22ce68a
small nit changes from pr reviews
Monkeychip May 31, 2024
6fd9b21
add defaults to sync mirage handler
Monkeychip May 31, 2024
51bf477
Gate sync overview route for users without access (#27320)
Jun 3, 2024
e6b9811
Merge branch 'main' into ui/VAULT-27608/hide-secrets-sync-when-no-access
Monkeychip Jun 4, 2024
8f0fed0
add type enterprise required now because we do a check for this first
Monkeychip Jun 4, 2024
0e598d8
Merge branch 'main' into ui/VAULT-27608/hide-secrets-sync-when-no-access
Monkeychip Jun 10, 2024
e8bf2c4
fix oss test
Monkeychip Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class SyncActivationModal extends Component<Args> {
.adapterFor('application')
.ajax('/v1/sys/activation-flags/secrets-sync/activate', 'POST', { namespace });
// must refresh and not transition because transition does not refresh the model from within a namespace
yield this.router.refresh();
yield this.router.refresh('vault.cluster');
Copy link
Contributor

@andaley andaley May 29, 2024

Choose a reason for hiding this comment

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

you can probably take this or leave it, but i tried explicitly passing in the parent route that we want refreshed here to see if it'd help us assert that the get activated features was successfully re-fetched. i tried this based on the docs i read here:
Screenshot 2024-05-29 at 3 39 22 PM

doing this works fine in the UI, and after adding a bunch of console.log statements i can see even in the test output that _/activation-flags is fetched after a POST, but i can't get the assertions working how i'd like. because we have these assertions that effectively test that the UI updates once the feature is activated i think we're safe skipping the extra assertions.

} catch (error) {
this.args.onError(errorMessage(error));
this.flashMessages.danger(`Error enabling feature \n ${errorMessage(error)}`);
Expand Down