Don't expect key for singleton objects (dnsconfig, config, realmdomains)
https://fedorahosted.org/freeipa/ticket/3236
This commit is contained in:
1 parent
41324cf619
commit
a8b48a8f42
6 files changed
+12
-1
No files matched your search
@@ -29,6 +29,9 @@ IPA.dns = {
|
||||
|
||||
IPA.dns.config_entity = function(spec) {
|
||||
|
||||
spec = spec || {};
|
||||
spec.defines_key = false;
|
||||
|
||||
var that = IPA.entity(spec);
|
||||
|
||||
that.init = function() {
|
||||
|
||||
@@ -37,6 +37,8 @@ IPA.entity = function(spec) {
|
||||
that.name = spec.name;
|
||||
that.label = spec.label;
|
||||
|
||||
that.defines_key = spec.defines_key !== undefined ? spec.defines_key : true;
|
||||
|
||||
that.metadata = spec.metadata;
|
||||
that.builder = spec.builder;
|
||||
|
||||
|
||||
@@ -198,8 +198,8 @@ IPA.facet = function(spec, no_init) {
|
||||
var cur_l = cur_keys.length;
|
||||
var tot_c = 0;
|
||||
while (current_entity) {
|
||||
if (current_entity.defines_key) tot_c++;
|
||||
current_entity = current_entity.get_containing_entity();
|
||||
tot_c++;
|
||||
}
|
||||
|
||||
if (tot_c < arg_l || tot_c < cur_l) throw {
|
||||
|
||||
@@ -312,6 +312,8 @@ define(['dojo/_base/declare',
|
||||
*/
|
||||
_decode_pkeys: function(str) {
|
||||
|
||||
if (!str) return [];
|
||||
|
||||
var keys = str.split('&');
|
||||
for (var i=0; i<keys.length; i++) {
|
||||
keys[i] = decodeURIComponent(keys[i]);
|
||||
|
||||
@@ -24,6 +24,8 @@ define(['./ipa', './jquery', './details', './entity'], function (IPA, $) {
|
||||
|
||||
IPA.realmdomains.entity = function (spec) {
|
||||
|
||||
spec = spec || {};
|
||||
spec.defines_key = false;
|
||||
var that = IPA.entity(spec);
|
||||
|
||||
that.init = function () {
|
||||
|
||||
@@ -26,6 +26,8 @@ IPA.serverconfig = {};
|
||||
|
||||
IPA.serverconfig.entity = function(spec) {
|
||||
|
||||
spec = spec || {};
|
||||
spec.defines_key = false;
|
||||
var that = IPA.entity(spec);
|
||||
|
||||
that.init = function() {
|
||||
|
||||
Reference in new issue
Block a user