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

[RBAC] Fix bug where team could not be given read_role to other team #15067

Merged
merged 6 commits into from
Apr 5, 2024

Conversation

AlanCoding
Copy link
Member

SUMMARY

I tracked down this bug as the source of some failures we were seeing. Steps were:

  • Setup: create a user, and 2 teams, call them parent team and child team
  • Give the user member role to the parent team
  • Give the parent team read_role to the child team

The bug is that the user could not see the child team at the end of these steps. This was a bug strictly with the translation layer. The team-to-team permission was applied in the old roles, but not applied in the DAB RBAC system because the m2m_changed signal we relied on to relay this change was considering this to be a parent addition we should ignore.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API

Copy link
Contributor

@PabloHiro PabloHiro left a comment

Choose a reason for hiding this comment

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

Tests failing, to be debugged :S

@AlanCoding
Copy link
Member Author

This should be in better shape now, but awaiting results.

@AlanCoding
Copy link
Member Author

Updated results look good

awx/main/models/rbac.py Outdated Show resolved Hide resolved
from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>
@AlanCoding AlanCoding merged commit ae45ff3 into ansible:feature_dab_rbac Apr 5, 2024
13 of 20 checks passed
PabloHiro pushed a commit that referenced this pull request Apr 8, 2024
…15067)

* Fix bug where team could not be given read_role to other team

* Avoid unwanted triggers of parentage granting

* Restructure signal structure

* Fix another bug unmasked by team member permission fix

* Changes to live with test writing

* Use equality as opposed to string "in"

from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>

---------

Co-authored-by: Seth Foster <[email protected]>
PabloHiro pushed a commit that referenced this pull request Apr 9, 2024
…15067)

* Fix bug where team could not be given read_role to other team

* Avoid unwanted triggers of parentage granting

* Restructure signal structure

* Fix another bug unmasked by team member permission fix

* Changes to live with test writing

* Use equality as opposed to string "in"

from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>

---------

Co-authored-by: Seth Foster <[email protected]>
AlanCoding added a commit that referenced this pull request Apr 10, 2024
…15067)

* Fix bug where team could not be given read_role to other team

* Avoid unwanted triggers of parentage granting

* Restructure signal structure

* Fix another bug unmasked by team member permission fix

* Changes to live with test writing

* Use equality as opposed to string "in"

from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>

---------

Co-authored-by: Seth Foster <[email protected]>
AlanCoding added a commit that referenced this pull request Apr 10, 2024
…15067)

* Fix bug where team could not be given read_role to other team

* Avoid unwanted triggers of parentage granting

* Restructure signal structure

* Fix another bug unmasked by team member permission fix

* Changes to live with test writing

* Use equality as opposed to string "in"

from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>

---------

Co-authored-by: Seth Foster <[email protected]>
AlanCoding added a commit that referenced this pull request Apr 11, 2024
…15067)

* Fix bug where team could not be given read_role to other team

* Avoid unwanted triggers of parentage granting

* Restructure signal structure

* Fix another bug unmasked by team member permission fix

* Changes to live with test writing

* Use equality as opposed to string "in"

from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>

---------

Co-authored-by: Seth Foster <[email protected]>
AlanCoding added a commit that referenced this pull request Apr 11, 2024
…15067)

* Fix bug where team could not be given read_role to other team

* Avoid unwanted triggers of parentage granting

* Restructure signal structure

* Fix another bug unmasked by team member permission fix

* Changes to live with test writing

* Use equality as opposed to string "in"

from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>

---------

Co-authored-by: Seth Foster <[email protected]>
djyasin pushed a commit to djyasin/awx that referenced this pull request Sep 16, 2024
…nsible#15067)

* Fix bug where team could not be given read_role to other team

* Avoid unwanted triggers of parentage granting

* Restructure signal structure

* Fix another bug unmasked by team member permission fix

* Changes to live with test writing

* Use equality as opposed to string "in"

from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>

---------

Co-authored-by: Seth Foster <[email protected]>
djyasin pushed a commit to djyasin/awx that referenced this pull request Nov 11, 2024
…nsible#15067)

* Fix bug where team could not be given read_role to other team

* Avoid unwanted triggers of parentage granting

* Restructure signal structure

* Fix another bug unmasked by team member permission fix

* Changes to live with test writing

* Use equality as opposed to string "in"

from Seth in review comment

Co-authored-by: Seth Foster <[email protected]>

---------

Co-authored-by: Seth Foster <[email protected]>
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.

3 participants