Add showInAdvancedViewOnly to every new object
authorAndrew Bartlett <abartlet@samba.org>
Fri, 18 Jan 2008 05:56:41 +0000 (16:56 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 18 Jan 2008 05:56:41 +0000 (16:56 +1100)
Unless already set, the default value for this comes from the
defaultHidingValue in the schema.

Andrew Bartlett

source/dsdb/samdb/ldb_modules/objectclass.c

index d3beedc689ccb488d1c81f2ef921c19206de0ca9..871c38476b912410a0b47040eff4eecfdeb0e492 100644 (file)
@@ -532,6 +532,10 @@ 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")) {
+                                       ldb_msg_add_string(msg, "showInAdvancedViewOnly", 
+                                                          current->objectclass->defaultHidingValue ? "TRUE" : "FALSE");
+                               }
                                if (!ldb_msg_find_element(msg, "nTSecurityDescriptor")) {
                                        DATA_BLOB *sd = get_sd(ac->module, mem_ctx, current->objectclass);
                                        ldb_msg_add_steal_value(msg, "nTSecurityDescriptor", sd);