mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixed entity metadata resolution.
The current code assumes that an entity will always have a corresponding LDAPObject on the server, so it looks for the metadata in a fixed location. This assumption doesn't work for HBAC Test since it is a Command, not an LDAPObject, so the metadata has to be obtained from a different location. A new method get_default_metadata() has been added to allow each entity to find the metadata from the correct location. Ticket #388
This commit is contained in:
committed by
Endi S. Dewata
parent
6f0c16e428
commit
a8ea42bda8
@@ -29,16 +29,17 @@ IPA.dns.zone_entity = function(spec) {
|
||||
|
||||
var that = IPA.entity(spec);
|
||||
|
||||
if (!IPA.dns_enabled) {
|
||||
var except = {
|
||||
expected: true
|
||||
};
|
||||
throw except;
|
||||
}
|
||||
that.init = function() {
|
||||
|
||||
that.init = function(params) {
|
||||
if (!IPA.dns_enabled) {
|
||||
throw {
|
||||
expected: true
|
||||
};
|
||||
}
|
||||
|
||||
params.builder.facet_groups([ 'dnsrecord', 'settings' ]).
|
||||
that.entity_init();
|
||||
|
||||
that.builder.facet_groups([ 'dnsrecord', 'settings' ]).
|
||||
search_facet({
|
||||
title: IPA.metadata.objects.dnszone.label,
|
||||
columns: [ 'idnsname' ]
|
||||
@@ -483,16 +484,17 @@ IPA.dns.record_entity = function(spec) {
|
||||
|
||||
var that = IPA.entity(spec);
|
||||
|
||||
if (!IPA.dns_enabled) {
|
||||
var except = {
|
||||
expected: true
|
||||
};
|
||||
throw except;
|
||||
}
|
||||
that.init = function() {
|
||||
|
||||
that.init = function(params) {
|
||||
if (!IPA.dns_enabled) {
|
||||
throw {
|
||||
expected: true
|
||||
};
|
||||
}
|
||||
|
||||
params.builder.containing_entity('dnszone').
|
||||
that.entity_init();
|
||||
|
||||
that.builder.containing_entity('dnszone').
|
||||
details_facet({
|
||||
post_update_hook:function(data){
|
||||
var result = data.result.result;
|
||||
|
||||
Reference in New Issue
Block a user