diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2011-12-09 18:12:25 -0600 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-01-16 20:11:18 +0100 |
commit | 7529a79f4b17a214c47a0f34e1617654bfd20ab0 (patch) | |
tree | fb845af62d4aeaf5f1d32d213adc7b5b0f24fb2c /install | |
parent | 7f6c9ac04c751063c932109855cf02c26a50a6ee (diff) | |
download | freeipa-7529a79f4b17a214c47a0f34e1617654bfd20ab0.tar.gz freeipa-7529a79f4b17a214c47a0f34e1617654bfd20ab0.tar.xz freeipa-7529a79f4b17a214c47a0f34e1617654bfd20ab0.zip |
Enabled paging on self-service permissions and delegations.
Paging has been enabled on self-service permissions and delegations
list pages. The search facet's get_pkeys() has been fixed to handle
non-array value. New test data files have been added as well.
Ticket #2092
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/aci.js | 2 | ||||
-rw-r--r-- | install/ui/search.js | 7 | ||||
-rw-r--r-- | install/ui/test/data/delegation_find_pkeys.json | 14 | ||||
-rw-r--r-- | install/ui/test/data/delegation_get_records.json | 30 | ||||
-rw-r--r-- | install/ui/test/data/selfservice_find_pkeys.json | 17 | ||||
-rw-r--r-- | install/ui/test/data/selfservice_get_records.json | 69 |
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" + } + ] + } +} |