diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-09-13 14:07:22 +0200 |
---|---|---|
committer | Alexander Bokovoy <abokovoy@redhat.com> | 2014-02-11 15:02:52 +0200 |
commit | e2fc5e8ac9259d37a1f2d9462eec7135b342973b (patch) | |
tree | 87ed55184cb8fff6fc739091ab55e7de91c60bf0 /install/ui/src/freeipa/radiusproxy.js | |
parent | aef15e7d5e41d7d4588f46ebf0aa1deba91b83fe (diff) | |
download | freeipa-e2fc5e8ac9259d37a1f2d9462eec7135b342973b.tar.gz freeipa-e2fc5e8ac9259d37a1f2d9462eec7135b342973b.tar.xz freeipa-e2fc5e8ac9259d37a1f2d9462eec7135b342973b.zip |
UI for radius proxy
https://fedorahosted.org/freeipa/ticket/3369
Diffstat (limited to 'install/ui/src/freeipa/radiusproxy.js')
-rw-r--r-- | install/ui/src/freeipa/radiusproxy.js | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/radiusproxy.js b/install/ui/src/freeipa/radiusproxy.js new file mode 100644 index 000000000..375750e52 --- /dev/null +++ b/install/ui/src/freeipa/radiusproxy.js @@ -0,0 +1,138 @@ +/* Authors: + * Petr Vobornik <pvoborni@redhat.com> + * + * Copyright (C) 2010 Red Hat + * see file 'COPYING' for use and warranty information + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +define([ + './ipa', + './jquery', + './menu', + './phases', + './reg', + './details', + './search', + './entity', + './dialogs/password' + ], + function(IPA, $, menu, phases, reg) { + +/** + * Radius module + * @class + * @singleton + */ +var radiusproxy = IPA.radiusproxy = {}; + +var make_spec = function() { +return { + name: 'radiusproxy', + enable_test: function() { + return true; + }, + facets: [ + { + $type: 'search', + columns: [ + 'cn', + 'ipatokenradiusserver', + 'ipatokenusermapattribute', + 'description' + ] + }, + { + $type: 'details', + sections: [ + { + name: 'details', + label: '@i18n:objects.radiusproxy.details', + fields: [ + 'cn', + { + $type: 'textarea', + name: 'description' + }, + { + $type: 'multivalued', + name: 'ipatokenradiusserver' // TODO: add validation + }, + 'ipatokenusermapattribute', // TODO: add validation + 'ipatokenradiustimeout', + 'ipatokenradiusretries' + ], + action_panel: { + name: 'radius_actions', + actions: [ + 'password' + ] + } + } + ], + actions: [ + { + $type: 'password', + dialog: { + password_name: 'ipatokenradiussecret' + } + } + ] + } + ], + adder_dialog: { + fields: [ + 'cn', + { + $type: 'multivalued', + name: 'ipatokenradiusserver' + }, + { + $type: 'password', + name: 'ipatokenradiussecret' + }, + { + $type: 'password', + name: 'secret_verify', + label: '@i18n:password.verify_password', + flags: ['no_command'], + required: true, + validators: [{ + $type: 'same_password', + other_field: 'ipatokenradiussecret' + }] + }, + 'ipatokenusermapattribute' + ] + } +};}; + +/** + * Radius specification object + */ +radiusproxy.spec = make_spec(); + +/** + * Register radiusproxy entity + */ +radiusproxy.register = function() { + var e = reg.entity; + e.register({type: 'radiusproxy', spec: radiusproxy.spec}); +}; + +phases.on('registration', radiusproxy.register); + +return radiusproxy; +});
\ No newline at end of file |