Skip to content

Commit 9fd9d69

Browse files
committed
Update manually
1 parent be22014 commit 9fd9d69

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

docs/apps/rbac/for_app_developers.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,23 @@
22

33
These instructions are intended for someone applying this system to an existing Django app.
44
Start with `docs/Installation.md` for the core ansible_base setup.
5-
The app name is dab_rbac, INSTALLED_APPS path is "ansible_base.rbac".
5+
6+
The 2 main things to enable DAB RBAC are:
7+
1. Add to INSTALLED_APPS in settings, path is "ansible_base.rbac"
8+
2. Register your models with the DAB RBAC `permission_registry`
69

710
### DAB Models vs Django Models
811

912
DAB RBAC uses specialized models that mirror Django's built-in auth models but are purpose-built for the RBAC system:
1013

1114
- **`DABPermission`** - Mirrors Django's `Permission` model but only tracks permissions for RBAC-registered models and supports remote models
1215
- **`DABContentType`** - Mirrors Django's `ContentType` but with enhanced caching and support for remote models
13-
- **User/Team/Organization Models** - Configurable through settings, defaults to Django's built-in models
16+
- **User/Team/Organization Models** - Configurable through settings, defaults to Django or DAB default models
1417

15-
This parallel structure provides:
18+
The custom permission and content type models provide:
1619
- Better performance through aggressive caching
1720
- Support for tracking permissions to remote services
18-
- Clean separation from Django's built-in auth system
19-
20-
### Integration Approach
21-
22-
You can use DAB RBAC entirely at the Django model level:
23-
- Use role definitions to delegate permissions to users and teams
24-
- The system efficiently filters querysets to show only objects a user has permission to access
21+
- Clean separation from Django's built-in auth system, avoiding conflicts with other apps
2522

2623
### Terminology for Developers
2724

@@ -31,7 +28,7 @@ When working with DAB RBAC code, use precise terminology:
3128
- **Object Role** - The instantiation of a role definition for a specific object
3229
- **Role Assignment** - The record linking a user/team to a role definition for an object or globally
3330
- **Permission** - An action on a model type (e.g., "change_inventory")
34-
- **Access** - Avoid this term in code; use specific permission evaluations instead
31+
- **Access** - Avoid this term in code; used for AWX `awx/main/access.py` module, overlay logic on top of RBAC evaluations
3532

3633
User-facing interfaces may simplify "role definition" to "role" for usability, but internal code should maintain precision.
3734

docs/apps/rbac/for_clients.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Using DAB RBAC as an API Client
22

3-
This section explains how to use the RBAC API endpoints to manage permissions. The API follows a clear hierarchy that reflects the system architecture.
3+
This section explains how to use the RBAC API endpoints to manage permissions.
44

55
### Prerequisites
66

@@ -111,7 +111,11 @@ The role definition must have `content_type: null` for global assignments.
111111

112112
### Team Membership
113113

114-
First, users must be members of teams. Team membership grants the "member_team" permission and automatically inherits all permissions assigned to the team.
114+
Teams are used to bulk assign permissions to multiple users.
115+
116+
You give permissions to a team by assigning the team a role definition, usually for a specific object. A single team can be assigned many roles, to many different objects. Teams can in theory be given global roles, but this may be disabled by the application settings.
117+
118+
If a user has the "member_team" permission to a team, that user automatically inherits all permissions assigned to the team.
115119

116120
### Assign Role Definition to Team
117121

0 commit comments

Comments
 (0)