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

Fixes #36974 - show run job button to rex users #858

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

MariaAga
Copy link
Member

In a separate PR I want to try to deal with the issue that react#index paths dont get the correct auths, but I think we should first return the job buttons to Rex Users.

Added also view_remote_execution_features permission because I think normal users should be able to view the features? just not edit them

test: have a user with only rex user role, open /job_invocations before: no button, now: yes button.
Also for job reruns inside job_invocations/id, and in host details page (some hosts are infrastructure_host and will need extra permission to run job).

Copy link
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

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

Funny enough, but even without this patch I was able as a user with only REX user role to view and run a job by navigating manually to /job_invocations/new page...

With this patch I'm able to see the button and run the job. Also can view and run jobs on host details page. So the patch works it seems.

Maybe that's not relevant for this PR, but I've noticed few smaller issues:

  • as a user with viewer only permissions (not a REX user) I'm able to manually navigate to the job invocation page, but at least after I click run a see Access denied notification.
  • as a REX user I can't click checkboxes on /tasks page to e.g. cancel few jobs.

Otherwise LGTM and the changes make sense.

@kmalyjur, could you take a look as well?

@MariaAga
Copy link
Member Author

Thanks!

as a user with viewer only permissions (not a REX user) I'm able to manually navigate to the job invocation page, but at least after I click run a see Access denied notification.

@kmalyjur is fixing that.

as a REX user I can't click checkboxes on /tasks page to e.g. cancel few jobs.

Thats expected since rex users dont have permissions in tasks, thats what the Tasks Manager role is for I assume.

Copy link
Contributor

@kmalyjur kmalyjur left a comment

Choose a reason for hiding this comment

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

Awesome!

as a user with viewer only permissions (not a REX user) I'm able to manually navigate to the job invocation page, but at least after I click run a see Access denied notification.

I'm not sure what you mean exactly, but it could be regarding #842

@ofedoren
Copy link
Member

Okay then, let's get this in. Thanks, @MariaAga and @kmalyjur 🌹

@ofedoren ofedoren merged commit 9c0e2e4 into theforeman:master Dec 14, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants