-
Notifications
You must be signed in to change notification settings - Fork 896
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
Fix editing Ansible Credential/Repository for restricted user #17244
Fix editing Ansible Credential/Repository for restricted user #17244
Conversation
@miq-bot add_label bug, blocker |
@miq-bot add_label gaprindashvili/yes |
c6e7bbc
to
c0e591c
Compare
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1560525 Move acts_as_miq_taggable to Authentication base class to prevent 500 Internal Server Error when editing Ansible Credential for restricted user, in Automation > Ansible > Credentials.
2673c3a
to
83ff177
Compare
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1560525 Move acts_as_miq_taggable to ConfigurationScriptSource base class to prevent 500 Internal Server Error when editing Ansible Repository for restricted user, in Automation > Ansible > Repositories page.
83ff177
to
625f38d
Compare
Move acts_as_miq_taggable to ConfigurationScriptPayload class to prevent any potential errors in Automation > Ansible > Playbooks, similarly as in Ansible Credentials/Repositories pages.
625f38d
to
5978e08
Compare
Checked commits hstastna/manageiq@7378ebe~...5978e08 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@miq-bot assign @gtanzillo |
…t_credential_repo Fix editing Ansible Credential/Repository for restricted user (cherry picked from commit dcde0d6) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1563263
Gaprindashvili backport details:
|
I have no problem with moving this to the base models if we do need it. What's not clear to me is: If UI is operating at the abstraction level of Is this is a limitation from the backend (general groups/tags management) or UI is not targeting the right abstraction level? |
when edit screen is opened for credentials, this request is fired up
and API works only with base model |
@lpichler ok, thanks |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1560525
Move
acts_as_miq_taggable
to baseAuthentication
class to prevent 500 Internal Server Error whenediting Ansible Credential for restricted user, in Automation > Ansible > Credentials.
The same for Ansible Repository, in Automation > Ansible > Repositories page. The reason is that it looks like that API does not work with classes like
ManageIQ::Providers::AutomationManager
well so it is needed to addacts_as_miq_taggable
to base classes.Note: This PR addresses new changes related to #17049 (see the comments, there is one unanswered question about the UI and
ManageIQ::Providers::AutomationManager
class)Before reproducing:
or you have to make
disabled?
method returnfalse
, in app/helpers/application_helper/button/embedded_ansible.rb (not recommended, only for urgent needs!)Steps to reproduce the bug:
Before: (error occurs)
After: (no error occurred, editing page successfully opened)