summaryrefslogtreecommitdiffstats
path: root/install/ui/ipa.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-06-13 17:44:36 +0200
committerMartin Kosek <mkosek@redhat.com>2012-06-25 18:17:06 +0200
commitae19cce7adcb08cc192a9a2b320a09ab10269f52 (patch)
tree3c27c902afa5b8e80c3d4f6cf110bd9dcea643ac /install/ui/ipa.js
parenta5cb1961fe23335700df51c6aaae1f3d669dd71c (diff)
downloadfreeipa-ae19cce7adcb08cc192a9a2b320a09ab10269f52.tar.gz
freeipa-ae19cce7adcb08cc192a9a2b320a09ab10269f52.tar.xz
freeipa-ae19cce7adcb08cc192a9a2b320a09ab10269f52.zip
Trust Web UI
This patch adds Web UI for trusts. Navigation path is IPA Server/Trust. It allows to add, deleted and show trust. Mod command doesn't have defined input options so update of a trust is not supported yet. Adder dialog supports two ways if adding a trust: 1) adding with domain name, admin name and admin password. 2) adding with domain name, shared secret Search page shows only list of realm names which are trusts' cns. Details page is read only. It contains following attributes: * Realm name (cn) * Domain NetBIOS name (ipantflatname) * Domain Security Identifier (ipanttrusteddomainsid) * Trust direction (trustdirection) * Trust type (trusttype) trust_output_params also defines 'Trust status' param. This param is not return by show command as well so it's commented out in code until it's fixed in plugin code. Fields in details pages are using labels defined in internal.py. It is temporary solution until including of command.has_output_params will be added to metadata. https://fedorahosted.org/freeipa/ticket/2829
Diffstat (limited to 'install/ui/ipa.js')
-rw-r--r--install/ui/ipa.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index 7667c7669..f0ad01c32 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -1087,6 +1087,34 @@ IPA.build = function(spec, builder_fac) {
return product;
};
+IPA.build_default = function(spec, def_spec) {
+
+ var builder, factory, default_object;
+
+ if (!spec && !def_spec) return null;
+
+ if (typeof def_spec === 'function') { //factory function
+ factory = def_spec;
+ } else if (typeof def_spec === 'object') {
+ default_object = def_spec;
+ }
+
+ builder = IPA.builder({
+ factory: factory
+ });
+
+ var product;
+ spec = spec || default_object || {};
+
+ if ($.isArray(spec)) {
+ product = builder.build_objects(spec);
+ } else {
+ product = builder.build(spec);
+ }
+
+ return product;
+};
+
IPA.default_factory = function(spec) {
spec = spec || {};