hll_rcon_tool
hll_rcon_tool copied to clipboard
Include required permissions by endpoint in `get_api_documentation`
- Creates our own
permission_requireddecorator which just passes through to Django's method so that we can track which permissions are required by endpoint - Include the permission(s) required in
get_api_documentationto make it easier to determine which access a user requires to consume the API (whether through a tool or the UI)
Output looks like:
{
"endpoint": "add_admin",
"arguments": {
"player_id": {
"default": null,
"annotation": null
},
"role": {
"default": null,
"annotation": null
},
"description": {
"default": null,
"annotation": null
}
},
"return_type": "<class 'bool'>",
"doc_string": null,
"auto_settings_capable": true,
"permissions_required": [
"api.can_add_admin_roles"
],
"allowed_http_methods": [
"POST"
]
},