-
Notifications
You must be signed in to change notification settings - Fork 63
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
Pass userid before going to automation #54
Conversation
@miq-bot add_label fine/yes, bug, smart state |
@moolitayer Cannot apply the following label because they are not recognized: smart state |
@moolitayer we need a BZ |
Added bz |
@@ -184,7 +186,7 @@ def check_policy_prevent(policy_event, event_target, cb_method) | |||
:class_name => self.class.to_s, | |||
:instance_id => id, | |||
:method_name => :check_policy_prevent_callback, | |||
:args => [cb_method, event_target.class.name, event_target.id], | |||
:args => [cb_method, event_target.class.name, event_target.id, User.current_user.userid], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider determining the userid in scan_job_create
and passing it to this method.
Because the name check_policy_prevent
sounds like its job is to check policy and either do or not do a task, but isn't to figure out the task.
There were some long discussions that I don't remember on this method and similar methods elsewhere... Feel free to ignore, LGTM 👍 either way.
Checked commit moolitayer@0b1a4d0 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
LGTM 👍 |
Fine backport (to manageiq repo) details:
|
Calculating user in
raw_scan_job_create
is too late since it is called from automate and always evaluates to admin at that point.https://bugzilla.redhat.com/show_bug.cgi?id=1460754