mirror of
https://github.com/ansible/awx.git
synced 2026-09-12 23:05:00 -02:30
Merge branch 'release_2.4.0' into devel
* release_2.4.0: (24 commits) CheckAccess for related fields for teams Don't save the instance in set_actor if the user is invalid fixed related values not populating in teams ui update to more performant and 2.7.9 SSL-friendlier version of pywinrm added dm.xmlsec.bindin license stop waiting after summary fields are grabbed Remove social auth user fields settings that don't have any effect. fixed social authd user license issue Remove cedric-vincent proot repo Updating changelogs and readme Fix typo in AnonymousUser Fix an issue reauthing as a social auth user fixed organization rest call from happening fixed messing up add user form w social auth pw hide earlier Update response object nesting for pendo service update requirements.txt README hide un and pw fields when user is social auth based add pyrad to requirements.txt added appdirs add django-radius license ...
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name controllers.function:Teams
|
||||
@@ -227,34 +227,6 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
|
||||
$scope.PermissionAddAllowed = false;
|
||||
|
||||
// Retrieve each related set and any lookups
|
||||
if ($scope.teamLoadedRemove) {
|
||||
$scope.teamLoadedRemove();
|
||||
}
|
||||
$scope.teamLoadedRemove = $scope.$on('teamLoaded', function () {
|
||||
CheckAccess({ scope: $scope });
|
||||
if ($scope.organization_url) {
|
||||
Rest.setUrl($scope.organization_url);
|
||||
Rest.get()
|
||||
.success(function (data) {
|
||||
$scope.organization_name = data.name;
|
||||
master.organization_name = data.name;
|
||||
Wait('stop');
|
||||
})
|
||||
.error(function (data, status) {
|
||||
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to retrieve organization: ' +
|
||||
$scope.orgnization_url + '. GET status: ' + status });
|
||||
});
|
||||
for (var set in relatedSets) {
|
||||
$scope.search(relatedSets[set].iterator);
|
||||
}
|
||||
} else {
|
||||
$scope.organization_name = "";
|
||||
master.organization_name = "";
|
||||
Wait('stop');
|
||||
}
|
||||
});
|
||||
|
||||
// Retrieve each related set and any lookups
|
||||
if ($scope.loadTeamRemove) {
|
||||
$scope.loadTeamRemove();
|
||||
@@ -307,11 +279,20 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
});
|
||||
|
||||
$scope.organization_url = data.related.organization;
|
||||
$scope.$emit('teamLoaded');
|
||||
$scope.organization_name = data.summary_fields.organization.name;
|
||||
master.organization_name = data.summary_fields.organization.name;
|
||||
|
||||
// get related object values and populate
|
||||
for (var relatedValues in relatedSets) {
|
||||
$scope.search(relatedSets[relatedValues].iterator);
|
||||
}
|
||||
CheckAccess({ scope: $scope }); //Does the user have access to add/edit Permissions?
|
||||
Wait('stop');
|
||||
})
|
||||
.error(function (data, status) {
|
||||
ProcessErrors($scope, data, status, form, { hdr: 'Error!', msg: 'Failed to retrieve team: ' + $routeParams.team_id +
|
||||
'. GET status: ' + status });
|
||||
Wait('stop');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ export function UsersAdd($scope, $rootScope, $compile, $location, $log, $routePa
|
||||
$scope.ldap_user = false;
|
||||
$scope.not_ldap_user = !$scope.ldap_user;
|
||||
$scope.ldap_dn = null;
|
||||
$scope.socialAuthUser = false;
|
||||
|
||||
generator.reset();
|
||||
|
||||
@@ -307,6 +308,7 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
$scope.ldap_user = (data.ldap_dn !== null && data.ldap_dn !== undefined && data.ldap_dn !== '') ? true : false;
|
||||
$scope.not_ldap_user = !$scope.ldap_user;
|
||||
master.ldap_user = $scope.ldap_user;
|
||||
$scope.socialAuthUser = (data.auth.length > 0) ? true : false;
|
||||
|
||||
// Initialize related search functions. Doing it here to make sure relatedSets object is populated.
|
||||
RelatedSearchInit({
|
||||
|
||||
@@ -84,7 +84,7 @@ export default
|
||||
label: 'Password',
|
||||
type: 'sensitive',
|
||||
hasShowInputButton: true,
|
||||
ngShow: 'ldap_user == false',
|
||||
ngShow: 'ldap_user == false && socialAuthUser === false',
|
||||
addRequired: true,
|
||||
editRequired: false,
|
||||
ngChange: "clearPWConfirm('password_confirm')",
|
||||
@@ -95,7 +95,7 @@ export default
|
||||
label: 'Confirm Password',
|
||||
type: 'sensitive',
|
||||
hasShowInputButton: true,
|
||||
ngShow: 'ldap_user == false',
|
||||
ngShow: 'ldap_user == false && socialAuthUser === false',
|
||||
addRequired: true,
|
||||
editRequired: false,
|
||||
awPassMatch: true,
|
||||
|
||||
@@ -23,11 +23,11 @@ export default
|
||||
'FormGenerator', 'ParseHelper', 'ModalDialog', 'VariablesHelper', 'LicenseFormDefinition'])
|
||||
|
||||
|
||||
.factory('CheckLicense', ['$rootScope', '$compile', 'CreateDialog', 'Store',
|
||||
.factory('CheckLicense', ['$q', '$rootScope', '$compile', 'CreateDialog', 'Store',
|
||||
'LicenseUpdateForm', 'GenerateForm', 'TextareaResize', 'ToJSON', 'GetBasePath',
|
||||
'Rest', 'ProcessErrors', 'Alert', 'IsAdmin', '$location', 'pendoService',
|
||||
'Authorization', 'Wait',
|
||||
function($rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateForm,
|
||||
function($q, $rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateForm,
|
||||
TextareaResize, ToJSON, GetBasePath, Rest, ProcessErrors, Alert, IsAdmin, $location,
|
||||
pendoService, Authorization, Wait) {
|
||||
return {
|
||||
@@ -201,27 +201,49 @@ export default
|
||||
|
||||
test: function() {
|
||||
var license = Store('license'),
|
||||
notify = this.shouldNotify(license),
|
||||
self = this,
|
||||
scope;
|
||||
|
||||
self.scope = $rootScope.$new();
|
||||
scope = self.scope;
|
||||
var getLicense = function() {
|
||||
var deferred = $q.defer();
|
||||
|
||||
if (license && typeof license === 'object' && Object.keys(license).length > 0) {
|
||||
if (license.tested) {
|
||||
return true;
|
||||
if (license === null) {
|
||||
Rest.setUrl(GetBasePath('config'));
|
||||
return Rest.get()
|
||||
.then(function (data) {
|
||||
license = data.data.license_info;
|
||||
deferred.resolve();
|
||||
return deferred.promise;
|
||||
}, function () {
|
||||
deferred.resolve();
|
||||
return deferred.promise;
|
||||
});
|
||||
} else {
|
||||
deferred.resolve(license);
|
||||
return deferred.promise;
|
||||
}
|
||||
license.tested = true;
|
||||
Store('license',license); //update with tested flag
|
||||
}
|
||||
|
||||
// Don't do anything when the license is valid
|
||||
if (!notify) {
|
||||
return true; // if the license is valid it would exit 'test' here, otherwise it moves on to making the modal for the license
|
||||
}
|
||||
var promise = getLicense();
|
||||
promise.then(function() {
|
||||
self.scope = $rootScope.$new();
|
||||
scope = self.scope;
|
||||
|
||||
$location.path('/license');
|
||||
if (license && typeof license === 'object' && Object.keys(license).length > 0) {
|
||||
if (license.tested) {
|
||||
return true;
|
||||
}
|
||||
license.tested = true;
|
||||
Store('license',license); //update with tested flag
|
||||
}
|
||||
|
||||
// Don't do anything when the license is valid
|
||||
if (!self.shouldNotify(license)) {
|
||||
return true; // if the license is valid it would exit 'test' here, otherwise it moves on to making the modal for the license
|
||||
}
|
||||
|
||||
$location.path('/license');
|
||||
});
|
||||
},
|
||||
|
||||
GetLicense: function(callback, inScope) {
|
||||
|
||||
@@ -100,8 +100,10 @@ export default
|
||||
Rest.setUrl(url);
|
||||
var promise = Rest.get();
|
||||
promise.then(function (response) {
|
||||
config = response.license_info;
|
||||
config.analytics_status = response.analytics_status;
|
||||
config = response.data.license_info;
|
||||
config.analytics_status = response.data.analytics_status;
|
||||
config.version = response.data.version;
|
||||
config.ansible_version = response.data.ansible_version;
|
||||
if(config.analytics_status === 'detailed' || config.analytics_status === 'anonymous'){
|
||||
$pendolytics.bootstrap();
|
||||
deferred.resolve(config);
|
||||
|
||||
Reference in New Issue
Block a user