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

[WIP] Allow org admins to remove labels #7143

Merged

Conversation

rooftopcellist
Copy link
Member

@rooftopcellist rooftopcellist commented May 26, 2020

SUMMARY

Org Admin's couldn't unattach a label from a WFJT because the can_unattach() method in it's access class didn't cover that case.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • API
AWX VERSION
11.2.0
ADDITIONAL INFORMATION

I would like to add a test for this. I am also still investigating why this is not needed for Job Templates. There may be a better place for this fix.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@AlanCoding
Copy link
Member

why is this not needed for attaching, in addition to JTs? also curious about that.

@jbradberry
Copy link
Contributor

👀

Copy link
Contributor

@jbradberry jbradberry left a comment

Choose a reason for hiding this comment

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

Based on my investigation just now on the devel branch, the issue is that a TypeError is raised on line 498 due to a typo. Fixing the typo appears to allow an org admin to remove the label without problem, unless there is more to the issue than I realize.

obj, sub_obj, relationship, relationship, data=data

@rooftopcellist
Copy link
Member Author

@jbradberry is absolutely right. I just updated the PR.

@AlanCoding It is not needed for attaching, I just reverted my prior change to the unattach method.

It looks like this was just a typo in this commit: 4eab362#diff-c14c9d695bfbeb70889f2b42b18ed42dR495

Copy link
Contributor

@jbradberry jbradberry left a comment

Choose a reason for hiding this comment

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

🗿 👍

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

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.

5 participants