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 organization and team models #2094

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

cutwater
Copy link
Contributor

@cutwater cutwater commented Mar 7, 2024

  • Add new Oranization and Team models, that implement respective abstract models from DAB.
  • Add related database migrations and data migration, that creates a new default model.
  • Implement custom manager for the Organization model that retrieves the default organization.
  • Team model has a one-to-one relationship with the standard Group model.
  • When new Team record is created, a related Group model is automatically created as well.

No-Issue

@cutwater cutwater requested a review from newswangerd March 7, 2024 17:43
@github-actions github-actions bot added backport-4.2 This PR should be backported to stable-4.2 (1.2) backport-4.4 This PR should be backported to stable-4.4 (2.1) backport-4.5 This PR should be backported to stable-4.5 (2.2) backport-4.6 This PR should be backported to stable-4.6 (2.3) backport-4.7 This PR should be backported to stable-4.7 (2.4) backport-4.8 This PR should be backported to stable-4.8 (2.4) backport-4.9 This PR should be backported to stable-4.9 (2.4) labels Mar 7, 2024
@cutwater cutwater force-pushed the feature/AAP-20256-org-model-v4 branch from 0bad411 to 5e857ff Compare March 7, 2024 17:45
@cutwater cutwater marked this pull request as draft March 7, 2024 17:50
@cutwater cutwater force-pushed the feature/AAP-20256-org-model-v4 branch from 5e857ff to 72bbf86 Compare March 8, 2024 16:03
@cutwater cutwater marked this pull request as ready for review March 8, 2024 16:03
@cutwater cutwater force-pushed the feature/AAP-20256-org-model-v4 branch from 72bbf86 to 2791177 Compare March 8, 2024 16:05
@newswangerd newswangerd removed backport-4.2 This PR should be backported to stable-4.2 (1.2) backport-4.4 This PR should be backported to stable-4.4 (2.1) backport-4.5 This PR should be backported to stable-4.5 (2.2) backport-4.6 This PR should be backported to stable-4.6 (2.3) backport-4.7 This PR should be backported to stable-4.7 (2.4) backport-4.8 This PR should be backported to stable-4.8 (2.4) backport-4.9 This PR should be backported to stable-4.9 (2.4) labels Mar 11, 2024
@cutwater cutwater force-pushed the feature/AAP-20256-org-model-v4 branch 3 times, most recently from 8767151 to 691f7aa Compare March 11, 2024 17:37
* Add new `Oranization` and `Team` models, that implement respective abstract models from DAB.
* Add related database migrations and data migration, that creates a new default model.
* Implement custom manager for the `Organization` model that retrieves the default organization.
* Team model has a one-to-one relationship with the standard Group model.
* When new Team record is created, a related Group model is
  automatically created as well.

No-Issue
And drop group prefix for the default organization.

No-Issue
@cutwater cutwater force-pushed the feature/AAP-20256-org-model-v4 branch from 691f7aa to cd5d588 Compare March 11, 2024 17:43
@newswangerd newswangerd merged commit 62e1476 into ansible:master Mar 12, 2024
26 of 28 checks passed
@AlanCoding
Copy link
Member

AlanCoding commented Apr 8, 2024

Organization & team admins & members are implemented as a role in both DAB RBAC and current AWX.

Yes, they are implemented as relationships in Gateway. It will make our lives much easier if they never need to co-exist. I added a sub-feature of DAB RBAC to cope with that co-existence, but I had plans to remove it - ansible/django-ansible-base#159

Looking at this, it seems that ansible/django-ansible-base#159 may need to be closed, as with the way this is going, org admins may co-exist as both a relationship and a role at some point.

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