mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Obfuscate the license engine... implements AC-1069
This commit is contained in:
parent
70db6fadfc
commit
2587fe9f18
@ -15,7 +15,7 @@ from rest_framework.exceptions import ParseError, PermissionDenied
|
||||
# AWX
|
||||
from awx.main.utils import *
|
||||
from awx.main.models import *
|
||||
from awx.main.licenses import LicenseReader
|
||||
from awx.main.task_engine import TaskSerializer
|
||||
|
||||
__all__ = ['get_user_queryset', 'check_user_access']
|
||||
|
||||
@ -351,7 +351,7 @@ class HostAccess(BaseAccess):
|
||||
return False
|
||||
|
||||
# Check to see if we have enough licenses
|
||||
reader = LicenseReader()
|
||||
reader = TaskSerializer()
|
||||
validation_info = reader.from_file()
|
||||
|
||||
if 'test' in sys.argv:
|
||||
|
@ -11,7 +11,7 @@ from django.test.client import Client
|
||||
from django.core.urlresolvers import reverse
|
||||
from awx.main.models import Host, Inventory, Organization
|
||||
from awx.main.tests.base import BaseTest
|
||||
from awx.main.licenses import *
|
||||
from awx.main.task_engine import *
|
||||
|
||||
class LicenseTests(BaseTest):
|
||||
|
||||
@ -36,7 +36,7 @@ class LicenseTests(BaseTest):
|
||||
|
||||
def test_license_writer(self):
|
||||
|
||||
writer = LicenseWriter(
|
||||
writer = TaskEngager(
|
||||
company_name='acmecorp',
|
||||
contact_name='Michael DeHaan',
|
||||
contact_email='michael@ansibleworks.com',
|
||||
@ -56,7 +56,7 @@ class LicenseTests(BaseTest):
|
||||
strdata_loaded = json.loads(strdata)
|
||||
assert strdata_loaded == data
|
||||
|
||||
reader = LicenseReader()
|
||||
reader = TaskSerializer()
|
||||
|
||||
vdata = reader.from_string(strdata)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user