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

recompute has-permissions helper on permission service attr change #6473

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

meirish
Copy link
Contributor

@meirish meirish commented Mar 25, 2019

Previously, if a user was in a namespace, and switched - the navigation would stay the same as the previous namespace because the main nav doesn't get re-rendered and the has-permission helper shows the stale value. Now, we call the helper's recompute method when attributes on the permission service change.

To test using Vault Enterprise:

  1. create a namespace (I did one called “test”)
  2. enable userpass, create a user, and log in with them - give the user the default policy
  3. create a policy called “test-admin” where the content is path "test/*" { capabilities = [ "create", "read", "list", "delete", "update" ] }
  4. log in with the userpass user so that Vault generates an entity
  5. (I did this in the UI) look up the entity and edit it - where it asks what policies to assign, add the test-admin policy
  6. log in with the user in the root namespace
  7. switch to the “test” namespace
  8. the "Policies" tab should show up in the test namespace and disappear in the root namespace

@meirish meirish requested review from a team March 25, 2019 20:08
@meirish meirish added this to the 1.1.1 milestone Mar 26, 2019
Copy link
Contributor

@madalynrose madalynrose left a comment

Choose a reason for hiding this comment

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

manually tested! looks great!

@meirish meirish merged commit 43f06e0 into master Mar 26, 2019
@meirish meirish deleted the ui-ns-permissions-nav branch March 26, 2019 16:20
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.

2 participants