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

Add RBAC and Tagging Support to Ansible Credentials #3507

Merged

Conversation

hstastna
Copy link

@hstastna hstastna commented Mar 2, 2018

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1526219
Needs to merge with: ManageIQ/manageiq#17079


Done:

  • add Policy toolbar button to access tagging in Automation > Ansible > Credentials
    (Policy > Edit Tags)
  • add tagging_edit and tag_edit_form_field_changed to routes to enable tagging for Ansible Credentials or for proper rendering of tagging screen
  • add calling tag method to button method in ansible credential controller and also small refactoring of button method, in that controller
  • display tags in the table in summary page of any credential
  • make tagging work also from summary page of any credential
  • check if RBAC works
  • spec test for button method in ansible credential controller

Before:
credential_before

After:
edit_tags_credential
credential_tag
credential_tag_success
credential_summary

Note:
How to check RBAC support (one of possible scenarios):

  1. as an admin, tag some credential(s) from Automation > Ansible > Credentials,
    remember those tags
  2. in Configuration > Access Control > Groups, create a group so that under Assigned Filters in the first tab called My Company Tags, you choose the same tags from step 1.
  3. set EvmRole-administrator as a role of that group (not super administrator!) and save the group
  4. create a user with that group from step 3.
  5. logout and login as the user from step 4.
  6. go to Automation > Ansible > Credentials and you should see only credentials with the same tags as from step 2.

@hstastna
Copy link
Author

hstastna commented Mar 2, 2018

@miq-bot add_label blocker

@hstastna
Copy link
Author

hstastna commented Mar 2, 2018

@miq-bot add_label gaprindashvili/yes

@hstastna hstastna force-pushed the Add_RBAC_Tagging_Ansible_Credentials_ui branch 5 times, most recently from d57eac1 to 808ec76 Compare March 2, 2018 16:59
Hilda Stastna added 2 commits March 5, 2018 10:07
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1526219

Add Policy toolbar button to enable tagging in Automation > Ansible > Credentials.
Add also tag_edit_form_field_changed for proper rendering of tagging screen.
@hstastna hstastna force-pushed the Add_RBAC_Tagging_Ansible_Credentials_ui branch from 4a2eaea to fd8b600 Compare March 5, 2018 09:33
Hilda Stastna added 4 commits March 5, 2018 13:07
Add calling tag method to button method in ansible credential controller
and also small refactoring of button method, for tagging support of
Ansible Credentials.
Add displaying tags in the table in summary screen of a chosen credential,
in Automation > Ansible > Credentials.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1526219

Add Policy toolbar button to enable tagging of any Ansible Credential
from its summary page.
@hstastna hstastna force-pushed the Add_RBAC_Tagging_Ansible_Credentials_ui branch from 361d9eb to 9586334 Compare March 5, 2018 12:07
@hstastna hstastna changed the title [WIP] Add RBAC and Tagging Support to Ansible Credentials Add RBAC and Tagging Support to Ansible Credentials Mar 5, 2018
@hstastna
Copy link
Author

hstastna commented Mar 5, 2018

@h-kataria @dclarizio @martinpovolny Adding RBAC and Tagging Support to Ansible Credentials done so now I would need some review. Thanks so much! :)

@miq-bot
Copy link
Member

miq-bot commented Mar 5, 2018

Checked commits hstastna/manageiq-ui-classic@2900b7e~...9586334 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
6 files checked, 0 offenses detected
Everything looks fine. 🍰

@h-kataria
Copy link
Contributor

ManageIQ/manageiq#17079 is merged.

@h-kataria
Copy link
Contributor

looks good.

@h-kataria h-kataria added this to the Sprint 81 Ending Mar 12, 2018 milestone Mar 5, 2018
@h-kataria h-kataria merged commit f45a79b into ManageIQ:master Mar 5, 2018
simaishi pushed a commit that referenced this pull request Mar 9, 2018
…ntials_ui

Add RBAC and Tagging Support to Ansible Credentials
(cherry picked from commit f45a79b)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553393
@simaishi
Copy link
Contributor

simaishi commented Mar 9, 2018

Gaprindashvili backport details:

$ git log -1
commit a8b59877c58085845f726176a9a126c509dd4986
Author: Harpreet Kataria <[email protected]>
Date:   Mon Mar 5 17:12:00 2018 -0500

    Merge pull request #3507 from hstastna/Add_RBAC_Tagging_Ansible_Credentials_ui
    
    Add RBAC and Tagging Support to Ansible Credentials
    (cherry picked from commit f45a79b793d8578aa8583191b30ed3c32bda5e1c)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553393

@hstastna
Copy link
Author

hstastna commented Apr 5, 2018

@miq-bot add_label test

@miq-bot miq-bot added the test label Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants