diff --git a/lemur/defaults/views.py b/lemur/defaults/views.py index d053aef7..46987ab7 100644 --- a/lemur/defaults/views.py +++ b/lemur/defaults/views.py @@ -57,7 +57,8 @@ class LemurDefaults(AuthenticatedResource): state=current_app.config.get('LEMUR_DEFAULT_STATE'), location=current_app.config.get('LEMUR_DEFAULT_LOCATION'), organization=current_app.config.get('LEMUR_DEFAULT_ORGANIZATION'), - organizationalUnit=current_app.config.get('LEMUR_DEFAULT_ORGANIZATIONAL_UNIT') + organizationalUnit=current_app.config.get('LEMUR_DEFAULT_ORGANIZATIONAL_UNIT'), + issuerPlugin=current_app.config.get('LEMUR_DEFAULT_ISSUER_PLUGIN') ) api.add_resource(LemurDefaults, '/defaults', endpoint='default') diff --git a/lemur/static/app/angular/authorities/authority/authority.js b/lemur/static/app/angular/authorities/authority/authority.js index c67e7513..d4b4bdde 100644 --- a/lemur/static/app/angular/authorities/authority/authority.js +++ b/lemur/static/app/angular/authorities/authority/authority.js @@ -73,7 +73,15 @@ angular.module('lemur') PluginService.getByType('issuer').then(function (plugins) { $scope.plugins = plugins; - $scope.authority.plugin = plugins[0]; + if ($scope.authority.defaultIssuerPlugin) { + plugins.forEach(function(plugin) { + if (plugin.slug === $scope.authority.defaultIssuerPlugin) { + $scope.authority.plugin = plugin; + } + }); + } else { + $scope.authority.plugin = plugins[0]; + } }); $scope.roleService = RoleService; diff --git a/lemur/static/app/angular/authorities/services.js b/lemur/static/app/angular/authorities/services.js index 4af4daab..fa976b52 100644 --- a/lemur/static/app/angular/authorities/services.js +++ b/lemur/static/app/angular/authorities/services.js @@ -102,6 +102,7 @@ angular.module('lemur') authority.location = defaults.location; authority.organization = defaults.organization; authority.organizationalUnit = defaults.organizationalUnit; + authority.defaultIssuerPlugin = defaults.issuerPlugin; }); };