1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

don't set rh_username and rh_password in the license upload

This commit is contained in:
Ryan Petrello 2019-11-16 16:55:39 -05:00
parent f049b61460
commit 9458741b72
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777
2 changed files with 21 additions and 4 deletions

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def _cleanup_license_setting(apps, schema_editor):
Setting = apps.get_model('conf', 'Setting')
for license in Setting.objects.filter(key='LICENSE').all():
for k in ('rh_username', 'rh_password'):
license.value.pop(k, None)
license.save()
class Migration(migrations.Migration):
dependencies = [
('main', '0098_v360_rename_cyberark_aim_credential_type'),
]
operations = [migrations.RunPython(_cleanup_license_setting)]

View File

@ -187,10 +187,6 @@ export default
payload = $scope.newLicense.file;
} else if ($scope.selectedLicense.fullLicense) {
payload = $scope.selectedLicense.fullLicense;
if ($scope.rhCreds.username && $scope.rhCreds.password) {
payload.rh_password = $scope.rhCreds.password;
payload.rh_username = $scope.rhCreds.username;
}
}
CheckLicense.post(payload, $scope.newLicense.eula)