Passkey: add "passkey configuration" to webui

Add a "Passkey configuration" subtab in the "Policy" tab,
showing the settings for passkeyconfig.

Related: https://pagure.io/freeipa/issue/9261

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Florence Blanc-Renaud committed 2023-06-01 08:20:37 +02:00
1 parent 510f806a9f
commit c016e271b2
5 files changed
+85 -5

No files matched your search

+1
View File
@@ -44,6 +44,7 @@ define([
'./idviews',
'./netgroup',
'./otptoken',
'./passkeyconfig',
'./policy',
'./radiusproxy',
'./realmdomains',
@@ -149,7 +149,8 @@ var nav = {};
},
{ entity: 'selinuxusermap' },
{ entity: 'pwpolicy' },
{ entity: 'krbtpolicy' }
{ entity: 'krbtpolicy' },
{ entity: 'passkeyconfig' }
]
},
{
+66
View File
@@ -0,0 +1,66 @@
/*
* Copyright (C) 2022 FreeIPA Contributors see COPYING for license
*/
define([
'./ipa',
'./jquery',
'./phases',
'./reg',
'./details',
'./search',
'./association',
'./entity'],
function(IPA, $, phases, reg) {
var exp = IPA.passkeyconfig = {};
var make_spec = function() {
return {
name: 'passkeyconfig',
defines_key: false,
facets: [
{
$type: 'details',
title: '@mo:config.label',
sections: [
{
name: 'options',
label: '@i18n:objects.passkeyconfig.options',
fields: [
{
$type: 'radio',
name: 'iparequireuserverification',
default_value: 'default',
options: [
{
value: 'on',
label: '@i18n:objects.passkeyconfig.on'
},
{
value: 'off',
label: '@i18n:objects.passkeyconfig.off'
},
{
value: 'default',
label: '@i18n:objects.passkeyconfig.default'
}
]
}
]
}
],
needs_update: true
}
]
};};
exp.entity_spec = make_spec();
exp.register = function() {
var e = reg.entity;
e.register({type: 'passkeyconfig', spec: exp.entity_spec});
};
phases.on('registration', exp.register);
return {};
});