authChoice management
This commit is contained in:
parent
a9343808da
commit
319df84b93
|
@ -1913,6 +1913,52 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
|
||||||
type => 'authChoiceContainer',
|
type => 'authChoiceContainer',
|
||||||
keyTest => qr/^(\d*)?[a-zA-Z0-9_]+$/,
|
keyTest => qr/^(\d*)?[a-zA-Z0-9_]+$/,
|
||||||
keyMsgFail => 'Bad choice key',
|
keyMsgFail => 'Bad choice key',
|
||||||
|
select => [
|
||||||
|
[
|
||||||
|
{ k => 'Apache', v => 'Apache' },
|
||||||
|
{ k => 'AD', v => 'Active Directory' },
|
||||||
|
{ k => 'BrowserID', v => 'BrowserID (Mozilla Persona)' },
|
||||||
|
{ k => 'CAS', v => 'Central Authentication Service (CAS)' },
|
||||||
|
{ k => 'DBI', v => 'Database (DBI)' },
|
||||||
|
{ k => 'Facebook', v => 'Facebook' },
|
||||||
|
{ k => 'Google', v => 'Google' },
|
||||||
|
{ k => 'LDAP', v => 'LDAP' },
|
||||||
|
{ k => 'Null', v => 'None' },
|
||||||
|
{ k => 'OpenID', v => 'OpenID' },
|
||||||
|
{ k => 'OpenIDConnect', v => 'OpenID Connect' },
|
||||||
|
{ k => 'Proxy', v => 'Proxy' },
|
||||||
|
{ k => 'Radius', v => 'Radius' },
|
||||||
|
{ k => 'Remote', v => 'Remote' },
|
||||||
|
{ k => 'SAML', v => 'SAML v2' },
|
||||||
|
{ k => 'Slave', v => 'Slave' },
|
||||||
|
{ k => 'SSL', v => 'SSL' },
|
||||||
|
{ k => 'Twitter', v => 'Twitter' },
|
||||||
|
{ k => 'WebID', v => 'WebID' },
|
||||||
|
{ k => 'Yubikey', v => 'Yubikey' }
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{ k => 'AD', v => 'Active Directory' },
|
||||||
|
{ k => 'DBI', v => 'Database (DBI)' },
|
||||||
|
{ k => 'Facebook', v => 'Facebook' },
|
||||||
|
{ k => 'Google', v => 'Google' },
|
||||||
|
{ k => 'LDAP', v => 'LDAP' },
|
||||||
|
{ k => 'Null', v => 'None' },
|
||||||
|
{ k => 'OpenID', v => 'OpenID' },
|
||||||
|
{ k => 'OpenIDConnect', v => 'OpenID Connect' },
|
||||||
|
{ k => 'Proxy', v => 'Proxy' },
|
||||||
|
{ k => 'Remote', v => 'Remote' },
|
||||||
|
{ k => 'SAML', v => 'SAML v2' },
|
||||||
|
{ k => 'Slave', v => 'Slave' },
|
||||||
|
{ k => 'WebID', v => 'WebID' }
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{ k => 'AD', v => 'Active Directory' },
|
||||||
|
{ k => 'Choice', v => 'authChoice' },
|
||||||
|
{ k => 'DBI', v => 'Database (DBI)' },
|
||||||
|
{ k => 'LDAP', v => 'LDAP' },
|
||||||
|
{ k => 'Null', v => 'None' }
|
||||||
|
]
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
# Multi
|
# Multi
|
||||||
|
|
|
@ -339,6 +339,9 @@ sub _scanNodes {
|
||||||
);
|
);
|
||||||
$self->newConf->{$name} = {};
|
$self->newConf->{$name} = {};
|
||||||
foreach my $n (@$subNodes) {
|
foreach my $n (@$subNodes) {
|
||||||
|
if ( ref $n->{data} and ref $n->{data} eq 'ARRAY' ) {
|
||||||
|
$n->{data} = join ';', @{ $n->{data} };
|
||||||
|
}
|
||||||
$self->newConf->{$name}->{ $n->{title} } = $n->{data};
|
$self->newConf->{$name}->{ $n->{title} } = $n->{data};
|
||||||
$count++;
|
$count++;
|
||||||
unless ( defined $self->refConf->{$name}->{ $n->{title} } )
|
unless ( defined $self->refConf->{$name}->{ $n->{title} } )
|
||||||
|
|
|
@ -2,12 +2,29 @@
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title" trspan="authChain"/>
|
<h3 class="panel-title" trspan="authChain"/>
|
||||||
</div>
|
</div>
|
||||||
{{currentNode | json}}
|
<table class="table table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td trspan="name"></td>
|
||||||
|
<td>
|
||||||
|
<input ng-model="currentNode.title">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr ng-repeat="i in [[0,'authentication'],[1,'userDB'],[2,'passwordDB']]">
|
||||||
|
<td trspan="{{i[1]}}"</td>
|
||||||
|
<td>
|
||||||
|
<select id="selectform" class="form-control" ng-model="currentNode.data[i[0]]">
|
||||||
|
<option ng-repeat="item in _findContainer().select[i[0]]" ng-selected="item.k==currentNode.data[i[0]]" value="{{item.k}}">{{item.v}}</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
buttons=[{
|
buttons=[{
|
||||||
'title': 'newAuthChoice',
|
'action': 'newAuthChoice',
|
||||||
|
'title': 'newChain',
|
||||||
'icon': 'plus-sign'
|
'icon': 'plus-sign'
|
||||||
},{
|
},{
|
||||||
'title': 'deleteEntry',
|
'title': 'deleteEntry',
|
||||||
|
|
|
@ -2,11 +2,33 @@
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">{{translateTitle(currentNode)}}</h3>
|
<h3 class="panel-title">{{translateTitle(currentNode)}}</h3>
|
||||||
</div>
|
</div>
|
||||||
{{currentNode | json}}
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th trspan="name"></th>
|
||||||
|
<th trspan="authentication"></th>
|
||||||
|
<th trspan="userDB"></th>
|
||||||
|
<th trspan="passwordDB"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr ng-repeat="c in currentNode.nodes">
|
||||||
|
<td>
|
||||||
|
<input ng-model="c.title">
|
||||||
|
</td>
|
||||||
|
<td ng-repeat="i in [0,1,2]">
|
||||||
|
<select class="form-control" ng-model="c.data[i]">
|
||||||
|
<option ng-repeat="item in currentNode.select[i]" ng-selected="item.k==c.data[i]" value="{{item.k}}">{{item.v}}</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
buttons=[{
|
buttons=[{
|
||||||
'title': 'newAuthChoice',
|
'action': 'newAuthChoice',
|
||||||
|
'title': 'newChain',
|
||||||
'icon': 'plus-sign'
|
'icon': 'plus-sign'
|
||||||
}];
|
}];
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -240,7 +240,7 @@
|
||||||
node.nodes.push({
|
node.nodes.push({
|
||||||
"id": node.id + '/n' + (id++),
|
"id": node.id + '/n' + (id++),
|
||||||
"title": "1-key",
|
"title": "1-key",
|
||||||
"data": [],
|
"data": ['LDAP','LDAP','Null'],
|
||||||
"type": "authChoice"
|
"type": "authChoice"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -570,7 +570,7 @@
|
||||||
|
|
||||||
$scope.keyWritable = function(scope) {
|
$scope.keyWritable = function(scope) {
|
||||||
var node = scope.$modelValue;
|
var node = scope.$modelValue;
|
||||||
return node.type && node.type.match(/^(keyText|virtualHost|rule|menuCat|menuApp|samlAttribute)$/) ? true : false;
|
return node.type && node.type.match(/^(authChoice|keyText|virtualHost|rule|menuCat|menuApp|samlAttribute)$/) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* method `newRSAKey`
|
/* method `newRSAKey`
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
"applicationList": "Categories and applications",
|
"applicationList": "Categories and applications",
|
||||||
"appsInThisCat": "Applications in this category",
|
"appsInThisCat": "Applications in this category",
|
||||||
"attributesAndMacros": "Attributes and macros",
|
"attributesAndMacros": "Attributes and macros",
|
||||||
|
"authChain": "Authentication chain",
|
||||||
"authChoice": "Authentication choixe",
|
"authChoice": "Authentication choixe",
|
||||||
"authChoiceModules": "Allowed modules",
|
"authChoiceModules": "Allowed modules",
|
||||||
"authChoiceParam": "URL parameter",
|
"authChoiceParam": "URL parameter",
|
||||||
|
@ -290,6 +291,7 @@
|
||||||
"multiValuesSeparator": "Separator",
|
"multiValuesSeparator": "Separator",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"newApp": "New application",
|
"newApp": "New application",
|
||||||
|
"newChain": "New chain",
|
||||||
"newCat": "New category",
|
"newCat": "New category",
|
||||||
"newCfgAvailable": "A new configuration is available",
|
"newCfgAvailable": "A new configuration is available",
|
||||||
"newEntry": "New entry",
|
"newEntry": "New entry",
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
"applicationList": "Catégories et applications",
|
"applicationList": "Catégories et applications",
|
||||||
"appsInThisCat": "Applications dans cette catégorie",
|
"appsInThisCat": "Applications dans cette catégorie",
|
||||||
"attributesAndMacros": "Attributs et macros",
|
"attributesAndMacros": "Attributs et macros",
|
||||||
|
"authChain": "Chaîne d'authentification",
|
||||||
"authChoice": "Choix d'authentification",
|
"authChoice": "Choix d'authentification",
|
||||||
"authChoiceModules": "Modules autorisés",
|
"authChoiceModules": "Modules autorisés",
|
||||||
"authChoiceParam": "Paramètre de l'URL",
|
"authChoiceParam": "Paramètre de l'URL",
|
||||||
|
@ -290,6 +291,7 @@
|
||||||
"multiValuesSeparator": "Separateur",
|
"multiValuesSeparator": "Separateur",
|
||||||
"name": "Nom",
|
"name": "Nom",
|
||||||
"newApp": "Nouvelle application",
|
"newApp": "Nouvelle application",
|
||||||
|
"newChain": "Nouvelle chaîne",
|
||||||
"newCat": "Nouvelle catégorie",
|
"newCat": "Nouvelle catégorie",
|
||||||
"newCfgAvailable": "Une nouvelle configuration est disponible",
|
"newCfgAvailable": "Une nouvelle configuration est disponible",
|
||||||
"newEntry": "Nouvelle entrée",
|
"newEntry": "Nouvelle entrée",
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user