mirror of
https://github.com/ansible/awx.git
synced 2026-10-31 06:26:15 -02:30
AAP-51957 Move to new DAB RBAC queryset patterns (#16118)
Replace ResourceMixin/accessible_objects/accessible_pk_qs with DAB RBAC access_qs/access_ids_qs Remove the ResourceMixin class and migrate all callers to the new DAB RBAC queryset API: access_qs replaces accessible_objects and access_ids_qs replaces accessible_pk_qs, using permission strings (view, change, use, etc.) instead of role field names. Also updates prefetch_page_capabilities to use permission-based capability definitions instead of role field references. Restore UNION pattern in TeamAccess.filtered_queryset The access_qs migration accidentally collapsed the UNION into an OR, which can be 48x slower at scale (AAP-83319). Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
882d2df7f3
commit
7765376450
@@ -64,7 +64,7 @@ be the same as `serializer_class` of corresponding resource detail view; for exa
|
||||
Third, for the underlying model of the resource, add two macros, `FIELDS_TO_PRESERVE_AT_COPY` and
|
||||
`FIELDS_TO_DISCARD_AT_COPY`, as needed. Here is an example:
|
||||
```python
|
||||
class JobTemplate(UnifiedJobTemplate, JobOptions, SurveyJobTemplateMixin, ResourceMixin):
|
||||
class JobTemplate(UnifiedJobTemplate, JobOptions, SurveyJobTemplateMixin):
|
||||
'''
|
||||
A job template is a reusable job definition for applying a project (with
|
||||
playbook) to an inventory source with a given credential.
|
||||
|
||||
Reference in New Issue
Block a user