Commit 2982abb5 authored by Xavier Guimard's avatar Xavier Guimard

Combination in progress (#1151)

parent a8cb2940
......@@ -470,22 +470,10 @@ sub attributes {
'k' => 'AD',
'v' => 'Active Directory'
},
{
'k' => 'Choice',
'v' => 'authChoice'
},
{
'k' => 'CAS',
'v' => 'Central Authentication Service (CAS)'
},
{
'k' => 'DBI',
'v' => 'Database (DBI)'
},
{
'k' => 'Demo',
'v' => 'Demonstration'
},
{
'k' => 'Facebook',
'v' => 'Facebook'
......@@ -499,56 +487,68 @@ sub attributes {
'v' => 'LDAP'
},
{
'k' => 'Multi',
'v' => 'Multiple'
'k' => 'Radius',
'v' => 'Radius'
},
{
'k' => 'Null',
'v' => 'None'
'k' => 'SSL',
'v' => 'SSL'
},
{
'k' => 'OpenID',
'v' => 'OpenID'
'k' => 'Twitter',
'v' => 'Twitter'
},
{
'k' => 'OpenIDConnect',
'v' => 'OpenID Connect'
'k' => 'WebID',
'v' => 'WebID'
},
{
'k' => 'Proxy',
'v' => 'Proxy'
'k' => 'Yubikey',
'v' => 'Yubikey'
},
{
'k' => 'Radius',
'v' => 'Radius'
'k' => 'Demo',
'v' => 'Demonstration'
},
{
'k' => 'Remote',
'v' => 'Remote'
'k' => 'Choice',
'v' => 'authChoice'
},
{
'k' => 'SAML',
'v' => 'SAML v2'
'k' => 'Combination',
'v' => 'combineMods'
},
{
'k' => 'Slave',
'v' => 'Slave'
'k' => 'CAS',
'v' => 'Central Authentication Service (CAS)'
},
{
'k' => 'SSL',
'v' => 'SSL'
'k' => 'OpenID',
'v' => 'OpenID'
},
{
'k' => 'Twitter',
'v' => 'Twitter'
'k' => 'OpenIDConnect',
'v' => 'OpenID Connect'
},
{
'k' => 'WebID',
'v' => 'WebID'
'k' => 'SAML',
'v' => 'SAML v2'
},
{
'k' => 'Yubikey',
'v' => 'Yubikey'
'k' => 'Proxy',
'v' => 'Proxy'
},
{
'k' => 'Remote',
'v' => 'Remote'
},
{
'k' => 'Slave',
'v' => 'Slave'
},
{
'k' => 'Null',
'v' => 'None'
}
],
'type' => 'select'
......@@ -659,7 +659,89 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
},
'combModules' => {
'keyTest' => qr/^\w+$/,
'test' => sub {
'select' => [
{
'k' => 'Apache',
'v' => 'Apache'
},
{
'k' => 'AD',
'v' => 'Active Directory'
},
{
'k' => 'DBI',
'v' => 'Database (DBI)'
},
{
'k' => 'Facebook',
'v' => 'Facebook'
},
{
'k' => 'Google',
'v' => 'Google'
},
{
'k' => 'LDAP',
'v' => 'LDAP'
},
{
'k' => 'Radius',
'v' => 'Radius'
},
{
'k' => 'SSL',
'v' => 'SSL'
},
{
'k' => 'Twitter',
'v' => 'Twitter'
},
{
'k' => 'WebID',
'v' => 'WebID'
},
{
'k' => 'Yubikey',
'v' => 'Yubikey'
},
{
'k' => 'Demo',
'v' => 'Demonstration'
},
{
'k' => 'CAS',
'v' => 'Central Authentication Service (CAS)'
},
{
'k' => 'OpenID',
'v' => 'OpenID'
},
{
'k' => 'OpenIDConnect',
'v' => 'OpenID Connect'
},
{
'k' => 'SAML',
'v' => 'SAML v2'
},
{
'k' => 'Proxy',
'v' => 'Proxy'
},
{
'k' => 'Remote',
'v' => 'Remote'
},
{
'k' => 'Slave',
'v' => 'Slave'
},
{
'k' => 'Null',
'v' => 'None'
}
],
'test' => sub {
1;
},
'type' => 'cmbModuleContainer'
......
......@@ -1772,28 +1772,28 @@ sub attributes {
authentication => {
type => 'select',
select => [
{ k => 'Apache', v => 'Apache' },
{ k => 'AD', v => 'Active Directory' },
{ k => 'Choice', v => 'authChoice' },
{ k => 'Apache', v => 'Apache' },
{ k => 'AD', v => 'Active Directory' },
{ k => 'DBI', v => 'Database (DBI)' },
{ k => 'Facebook', v => 'Facebook' },
{ k => 'Google', v => 'Google' },
{ k => 'LDAP', v => 'LDAP' },
{ k => 'Radius', v => 'Radius' },
{ k => 'SSL', v => 'SSL' },
{ k => 'Twitter', v => 'Twitter' },
{ k => 'WebID', v => 'WebID' },
{ k => 'Yubikey', v => 'Yubikey' },
{ k => 'Demo', v => 'Demonstration' },
{ k => 'Choice', v => 'authChoice' },
{ k => 'Combination', v => 'combineMods' },
{ k => 'CAS', v => 'Central Authentication Service (CAS)' },
{ k => 'DBI', v => 'Database (DBI)' },
{ k => 'Demo', v => 'Demonstration' },
{ k => 'Facebook', v => 'Facebook' },
{ k => 'Google', v => 'Google' },
{ k => 'LDAP', v => 'LDAP' },
{ k => 'Multi', v => 'Multiple' },
{ k => 'Null', v => 'None' },
{ k => 'OpenID', v => 'OpenID' },
{ k => 'OpenID', v => 'OpenID' },
{ k => 'OpenIDConnect', v => 'OpenID Connect' },
{ k => 'SAML', v => 'SAML v2' },
{ 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 => 'Null', v => 'None' },
],
default => 'Demo',
documentation => 'Authentication module',
......@@ -2269,14 +2269,36 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
# Combination
combination => {
type => 'text',
type => 'text',
documentation => 'Combination rule'
},
combModules => {
type => 'cmbModuleContainer',
keyTest => qr/^\w+$/,
test => sub {1},
documentation => 'Combination module description'
type => 'cmbModuleContainer',
keyTest => qr/^\w+$/,
test => sub { 1 },
documentation => 'Combination module description',
select => [
{ k => 'Apache', v => 'Apache' },
{ k => 'AD', v => 'Active Directory' },
{ k => 'DBI', v => 'Database (DBI)' },
{ k => 'Facebook', v => 'Facebook' },
{ k => 'Google', v => 'Google' },
{ k => 'LDAP', v => 'LDAP' },
{ k => 'Radius', v => 'Radius' },
{ k => 'SSL', v => 'SSL' },
{ k => 'Twitter', v => 'Twitter' },
{ k => 'WebID', v => 'WebID' },
{ k => 'Yubikey', v => 'Yubikey' },
{ k => 'Demo', v => 'Demonstration' },
{ k => 'CAS', v => 'Central Authentication Service (CAS)' },
{ k => 'OpenID', v => 'OpenID' },
{ k => 'OpenIDConnect', v => 'OpenID Connect' },
{ k => 'SAML', v => 'SAML v2' },
{ k => 'Proxy', v => 'Proxy' },
{ k => 'Remote', v => 'Remote' },
{ k => 'Slave', v => 'Slave' },
{ k => 'Null', v => 'None' },
],
},
# Yubikey
......
......@@ -18,14 +18,14 @@
</td>
<td>
<select class="form-control" ng-model="currentNode.data.type" ng-change="execFilters(_findScopeByKey('authParams'))">
<option ng-repeat="item in _findContainer().select" ng-selected="item.k==currentNode.data[i]" value="{{item.k}}">{{item.v}}</option>
<option ng-repeat="item in _findContainer().select" ng-selected="item.k==currentNode.data.type" value="{{item.k}}">{{item.v}}</option>
</select>
</td>
<td>
<select class="form-control" ng-model="currentNode.data.for">
<option value="0" trspan="authAndUserdb">
<option value="0" trspan="authOnly">
<option value="0" trspan="userdbOnly">
<option value="0" ng-selected="currentNode.data.for===0" trspan="authAndUserdb">
<option value="1" ng-selected="currentNode.data.for===1" trspan="authOnly">
<option value="2" ng-selected="currentNode.data.for===2" trspan="userdbOnly">
</select>
</td>
</tr>
......
......@@ -18,14 +18,14 @@
</td>
<td>
<select class="form-control" ng-model="s.data.type" ng-change="execFilters(_findScopeByKey('authParams'))">
<option ng-repeat="item in currentNode.select[i]" ng-selected="item.k==s.data.type" value="{{item.k}}">{{item.v}}</option>
<option ng-repeat="item in currentNode.select" ng-selected="item.k==s.data.type" value="{{item.k}}">{{item.v}}</option>
</select>
</td>
<td>
<select class="form-control" ng-model="s.data.for">
<option value="0" trspan="authAndUserdb">
<option value="0" trspan="authOnly">
<option value="0" trspan="userdbOnly">
<option value="0" ng-selected="s.data.for===0" trspan="authAndUserdb">
<option value="1" ng-selected="s.data.for===1" trspan="authOnly">
<option value="2" ng-selected="s.data.for===2" trspan="userdbOnly">
</select>
</td>
<td>
......
......@@ -123,6 +123,10 @@
"choiceParams": "Choice parameters",
"chooseLogo": "Choose logo",
"chooseSkin": "Choose skin",
"combination": "Combination",
"combinationParams": "Combination parameters",
"combineMods": "Combination of modules",
"combModules": "Module list",
"comment": "Comment",
"comments": "Comments",
"condition": "Condition",
......@@ -350,6 +354,8 @@
"newChain": "New chain",
"newCat": "New category",
"newCfgAvailable": "A new configuration is available",
"newCmbMod": "New module",
"newCmbOver": "New parameter",
"newEntry": "New entry",
"newGrantRule": "New grant rule",
"newHost": "New host",
......
......@@ -123,6 +123,10 @@
"choiceParams": "Paramètres des choix",
"chooseLogo": "Choisir le logo",
"chooseSkin": "Choisir le thème",
"combination": "Combinaison",
"combinationParams": "Paramètres de combinaison",
"combineMods": "Combinaison de modules",
"combModules": "Liste des modules",
"comment": "Commentaire",
"comments": "Commentaires",
"condition": "Condition",
......@@ -350,6 +354,8 @@
"newChain": "Nouvelle chaîne",
"newCat": "Nouvelle catégorie",
"newCfgAvailable": "Une nouvelle configuration est disponible",
"newCmbMod": "Nouveau module",
"newCmbOver": "Nouveau paramètre",
"newEntry": "Nouvelle entrée",
"newGrantRule": "Nouvelle règle d'accès",
"newHost": "Nouvel hôte",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment