Entity build: test for enabled in post_op

https://fedorahosted.org/freeipa/ticket/3235
This commit is contained in:
Petr Vobornik
2013-04-18 18:54:43 +02:00
parent aba74aafe5
commit a513673f04

View File

@@ -461,6 +461,11 @@ exp.entity_post_ops = {
init: function(entity, spec, context) {
if (typeof spec.enable_test === 'function') {
if (!spec.enable_test()) throw {
expected: true
};
}
if (entity.init) {
entity.init(spec, context);
}