Adding a new default issuer.
This commit is contained in:
parent
ecbab64c35
commit
eefff8497a
|
@ -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')
|
||||
|
|
|
@ -73,7 +73,15 @@ angular.module('lemur')
|
|||
|
||||
PluginService.getByType('issuer').then(function (plugins) {
|
||||
$scope.plugins = plugins;
|
||||
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;
|
||||
|
|
|
@ -102,6 +102,7 @@ angular.module('lemur')
|
|||
authority.location = defaults.location;
|
||||
authority.organization = defaults.organization;
|
||||
authority.organizationalUnit = defaults.organizationalUnit;
|
||||
authority.defaultIssuerPlugin = defaults.issuerPlugin;
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue