mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 15:02:07 -03:30
Fix trial status and host limit with sub (#14237)
Co-authored-by: Lucas Benedito <lbenedit@redhat.com>
This commit is contained in:
parent
601b62deef
commit
6d1c8de4ed
@ -366,7 +366,7 @@ class BaseAccess(object):
|
||||
report_violation = lambda message: None
|
||||
else:
|
||||
report_violation = lambda message: logger.warning(message)
|
||||
if validation_info.get('trial', False) is True or validation_info['instance_count'] == 10: # basic 10 license
|
||||
if validation_info.get('trial', False) is True:
|
||||
|
||||
def report_violation(message): # noqa
|
||||
raise PermissionDenied(message)
|
||||
|
||||
@ -175,7 +175,12 @@ class Licenser(object):
|
||||
license.setdefault('pool_id', sub['pool']['id'])
|
||||
license.setdefault('product_name', sub['pool']['productName'])
|
||||
license.setdefault('valid_key', True)
|
||||
license.setdefault('license_type', 'enterprise')
|
||||
if sub['pool']['productId'].startswith('S'):
|
||||
license.setdefault('trial', True)
|
||||
license.setdefault('license_type', 'trial')
|
||||
else:
|
||||
license.setdefault('trial', False)
|
||||
license.setdefault('license_type', 'enterprise')
|
||||
license.setdefault('satellite', False)
|
||||
# Use the nearest end date
|
||||
endDate = parse_date(sub['endDate'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user