Only set showOnlyInAdvancedView: TRUE when adding default values.
authorAndrew Bartlett <abartlet@samba.org>
Fri, 18 Jan 2008 07:08:49 +0000 (18:08 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 18 Jan 2008 07:08:49 +0000 (18:08 +1100)
False is the default, so only set this when the schema requires the
hiding behaviour.

Andrew Bartlett
(This used to be commit 45f6ccefda39e8f0a9820ba55b1924b7cfb12262)

source4/dsdb/samdb/ldb_modules/objectclass.c

index 871c38476b912410a0b47040eff4eecfdeb0e492..737475ca78b24693bcfb7fd82e6a01b5a7fd9e40 100644 (file)
@@ -532,9 +532,9 @@ static int objectclass_do_add(struct ldb_handle *h)
                                        ldb_msg_add_string(msg, "objectCategory", 
                                                           current->objectclass->defaultObjectCategory);
                                }
-                               if (!ldb_msg_find_element(msg, "showInAdvancedViewOnly")) {
+                               if (!ldb_msg_find_element(msg, "showInAdvancedViewOnly") && (current->objectclass->defaultHidingValue == true)) {
                                        ldb_msg_add_string(msg, "showInAdvancedViewOnly", 
-                                                          current->objectclass->defaultHidingValue ? "TRUE" : "FALSE");
+                                                          "TRUE");
                                }
                                if (!ldb_msg_find_element(msg, "nTSecurityDescriptor")) {
                                        DATA_BLOB *sd = get_sd(ac->module, mem_ctx, current->objectclass);