summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/aci.js2
-rw-r--r--install/ui/search.js7
-rw-r--r--install/ui/test/data/delegation_find_pkeys.json14
-rw-r--r--install/ui/test/data/delegation_get_records.json30
-rw-r--r--install/ui/test/data/selfservice_find_pkeys.json17
-rw-r--r--install/ui/test/data/selfservice_get_records.json69
6 files changed, 135 insertions, 4 deletions
diff --git a/install/ui/aci.js b/install/ui/aci.js
index badc7953b..fc72b5192 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -327,7 +327,6 @@ IPA.aci.selfservice_entity = function(spec) {
that.entity_init();
that.builder.search_facet({
- pagination: false,
columns: [ 'aciname' ]
}).
details_facet({
@@ -371,7 +370,6 @@ IPA.aci.delegation_entity = function(spec) {
that.entity_init();
that.builder.search_facet({
- pagination: false,
columns: [ 'aciname' ]
}).
details_facet({
diff --git a/install/ui/search.js b/install/ui/search.js
index e541833c4..f82bf0d1e 100644
--- a/install/ui/search.js
+++ b/install/ui/search.js
@@ -162,8 +162,11 @@ IPA.search_facet = function(spec) {
var pkeys = [];
for (var i=0; i<result.length; i++) {
var record = result[i];
- var values = record[pkey_name];
- pkeys.push(values[0]);
+ var value = record[pkey_name];
+ if (value instanceof Array) {
+ value = value[0];
+ }
+ pkeys.push(value);
}
return pkeys;
};
diff --git a/install/ui/test/data/delegation_find_pkeys.json b/install/ui/test/data/delegation_find_pkeys.json
new file mode 100644
index 000000000..502737565
--- /dev/null
+++ b/install/ui/test/data/delegation_find_pkeys.json
@@ -0,0 +1,14 @@
+{
+ "error": null,
+ "id": null,
+ "result": {
+ "count": 1,
+ "result": [
+ {
+ "aciname": "Test Delegation"
+ }
+ ],
+ "summary": "1 delegation matched",
+ "truncated": false
+ }
+}
diff --git a/install/ui/test/data/delegation_get_records.json b/install/ui/test/data/delegation_get_records.json
new file mode 100644
index 000000000..3012b04a6
--- /dev/null
+++ b/install/ui/test/data/delegation_get_records.json
@@ -0,0 +1,30 @@
+{
+ "error": null,
+ "id": null,
+ "result": {
+ "count": 1,
+ "results": [
+ {
+ "error": null,
+ "result": {
+ "aciname": "Test Delegation",
+ "attrs": [
+ "cn",
+ "displayname",
+ "givenname",
+ "initials",
+ "sn",
+ "title"
+ ],
+ "group": "editors",
+ "memberof": "ipausers",
+ "permissions": [
+ "write"
+ ]
+ },
+ "summary": null,
+ "value": "Test Delegation"
+ }
+ ]
+ }
+}
diff --git a/install/ui/test/data/selfservice_find_pkeys.json b/install/ui/test/data/selfservice_find_pkeys.json
new file mode 100644
index 000000000..0aee1fe47
--- /dev/null
+++ b/install/ui/test/data/selfservice_find_pkeys.json
@@ -0,0 +1,17 @@
+{
+ "error": null,
+ "id": null,
+ "result": {
+ "count": 2,
+ "result": [
+ {
+ "aciname": "Self can write own password"
+ },
+ {
+ "aciname": "User Self service"
+ }
+ ],
+ "summary": "2 selfservices matched",
+ "truncated": false
+ }
+}
diff --git a/install/ui/test/data/selfservice_get_records.json b/install/ui/test/data/selfservice_get_records.json
new file mode 100644
index 000000000..ee0caafd5
--- /dev/null
+++ b/install/ui/test/data/selfservice_get_records.json
@@ -0,0 +1,69 @@
+{
+ "error": null,
+ "id": null,
+ "result": {
+ "count": 2,
+ "results": [
+ {
+ "error": null,
+ "result": {
+ "aciname": "Self can write own password",
+ "attrs": [
+ "userpassword",
+ "krbprincipalkey",
+ "sambalmpassword",
+ "sambantpassword"
+ ],
+ "permissions": [
+ "write"
+ ],
+ "selfaci": true
+ },
+ "summary": null,
+ "value": "Self can write own password"
+ },
+ {
+ "error": null,
+ "result": {
+ "aciname": "User Self service",
+ "attrs": [
+ "givenname",
+ "sn",
+ "cn",
+ "displayname",
+ "title",
+ "initials",
+ "loginshell",
+ "gecos",
+ "homephone",
+ "mobile",
+ "pager",
+ "facsimiletelephonenumber",
+ "telephonenumber",
+ "street",
+ "roomnumber",
+ "l",
+ "st",
+ "postalcode",
+ "manager",
+ "secretary",
+ "description",
+ "carlicense",
+ "labeleduri",
+ "inetuserhttpurl",
+ "seealso",
+ "employeetype",
+ "businesscategory",
+ "ou"
+ ],
+ "permissions": [
+ "write"
+ ],
+ "selfaci": true
+ },
+ "summary": null,
+ "value": "User Self service"
+ }
+ ]
+ }
+}