mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Merge pull request #1439 from wwitzel3/rbac-bug-1390
Update User/Team Roles API documentation.
This commit is contained in:
commit
2466fd0ca5
@ -183,4 +183,8 @@ class RoleMetadata(Metadata):
|
||||
metadata = super(RoleMetadata, self).determine_metadata(request, view)
|
||||
if 'actions' in metadata:
|
||||
metadata['actions'].pop('POST')
|
||||
metadata['actions']['POST'] = {
|
||||
"id": {"type": "integer", "label": "ID", "help_text": "Database ID for this role."},
|
||||
"disassociate": {"type": "integer", "label": "Disassociate", "help_text": "Provide to remove this role."},
|
||||
}
|
||||
return metadata
|
||||
|
||||
12
awx/api/templates/api/team_roles_list.md
Normal file
12
awx/api/templates/api/team_roles_list.md
Normal file
@ -0,0 +1,12 @@
|
||||
# List Roles for this Team:
|
||||
|
||||
Make a GET request to this resource to retrieve a list of roles associated with the selected team.
|
||||
|
||||
{% include "api/_list_common.md" %}
|
||||
|
||||
# Associate Roles with this Team:
|
||||
|
||||
Make a POST request to this resource to add or remove a role from this team. The following fields may be modified:
|
||||
|
||||
* `id`: Required. The Role ID to add to the team.
|
||||
* `disassociate`: Optional. Provide if you want to remove the role.
|
||||
12
awx/api/templates/api/user_roles_list.md
Normal file
12
awx/api/templates/api/user_roles_list.md
Normal file
@ -0,0 +1,12 @@
|
||||
# List Roles for this User:
|
||||
|
||||
Make a GET request to this resource to retrieve a list of roles associated with the selected user.
|
||||
|
||||
{% include "api/_list_common.md" %}
|
||||
|
||||
# Associate Roles with this User:
|
||||
|
||||
Make a POST request to this resource to add or remove a role from this user. The following fields may be modified:
|
||||
|
||||
* `id`: Required. The Role ID to add to the user.
|
||||
* `disassociate`: Optional. Provide if you want to remove the role.
|
||||
Loading…
x
Reference in New Issue
Block a user