mirror of
https://github.com/ansible/awx.git
synced 2026-03-29 06:45:09 -02:30
Merge pull request #3147 from jbradberry/become_method_list
Expose the known privilege escalation methods in the API config view
Reviewed-by: Ryan Petrello
https://github.com/ryanpetrello
This commit is contained in:
@@ -27,6 +27,7 @@ from awx.main.utils import (
|
|||||||
)
|
)
|
||||||
from awx.api.versioning import reverse, get_request_version, drf_reverse
|
from awx.api.versioning import reverse, get_request_version, drf_reverse
|
||||||
from awx.conf.license import get_license, feature_enabled
|
from awx.conf.license import get_license, feature_enabled
|
||||||
|
from awx.main.constants import PRIVILEGE_ESCALATION_METHODS
|
||||||
from awx.main.models import (
|
from awx.main.models import (
|
||||||
Project,
|
Project,
|
||||||
Organization,
|
Organization,
|
||||||
@@ -203,7 +204,8 @@ class ApiV1ConfigView(APIView):
|
|||||||
version=get_awx_version(),
|
version=get_awx_version(),
|
||||||
ansible_version=get_ansible_version(),
|
ansible_version=get_ansible_version(),
|
||||||
eula=render_to_string("eula.md") if license_data.get('license_type', 'UNLICENSED') != 'open' else '',
|
eula=render_to_string("eula.md") if license_data.get('license_type', 'UNLICENSED') != 'open' else '',
|
||||||
analytics_status=pendo_state
|
analytics_status=pendo_state,
|
||||||
|
become_methods=PRIVILEGE_ESCALATION_METHODS,
|
||||||
)
|
)
|
||||||
|
|
||||||
# If LDAP is enabled, user_ldap_fields will return a list of field
|
# If LDAP is enabled, user_ldap_fields will return a list of field
|
||||||
|
|||||||
Reference in New Issue
Block a user