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 tests for schedules on inventory and project updates #6240

Merged

Conversation

ryanpetrello
Copy link
Contributor

No description provided.

assert 'POST' in options(url, user=alice).data['actions'].keys()
post(url, params, alice, expect=201)

# can't create a schedule on JT2 because we don't have execute rights
jt2 = JobTemplate.objects.create(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AlanCoding mentioned in a prior view, explicitly testing this jt2 is sort of extraneous

assert 'POST' not in options(url, user=alice).data['actions'].keys()
post(url, params, alice, expect=403)

# use role does *not* grant the ability to schedule
Copy link
Member

Choose a reason for hiding this comment

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

man, that is subtle.

It would allow for creation of schedules of ad hoc commands. That's just not a thing.

Copy link
Member

Choose a reason for hiding this comment

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

no, that's not use role, that would be ad_hoc role I was thinking of. Yeah, use is just for using in JTs.

Copy link
Member

@AlanCoding AlanCoding left a comment

Choose a reason for hiding this comment

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

I gladly approve PR of only tests.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 789397d into ansible:devel Mar 10, 2020
TheRealHaoLiu pushed a commit to TheRealHaoLiu/awx that referenced this pull request Feb 8, 2023
[Backport 4.3] Fixes 'Not Found' error on looking up credentials
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.

3 participants