From b25fe5e9c226441bbcaf23ce002924422e3e54e4 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 23 Feb 2007 19:47:24 +0000
Subject: [PATCH] Update the entry schema checking code to ensure that all attributes have at least one value.  This will prevent add requests from being able to add entries containing attributes with no values.

---
 opends/src/server/org/opends/server/messages/CoreMessages.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/messages/CoreMessages.java b/opends/src/server/org/opends/server/messages/CoreMessages.java
index 365473e..e3980ad 100644
--- a/opends/src/server/org/opends/server/messages/CoreMessages.java
+++ b/opends/src/server/org/opends/server/messages/CoreMessages.java
@@ -6248,6 +6248,16 @@
 
 
   /**
+   * The message ID for the message that will be used if an entry includes an
+   * attribute with no values.  This takes two arguments, which are the DN of
+   * the entry and the name of the attribute.
+   */
+  public static final int MSGID_ENTRY_SCHEMA_ATTR_NO_VALUES =
+       CATEGORY_MASK_CORE | SEVERITY_MASK_MILD_ERROR | 597;
+
+
+
+  /**
    * Associates a set of generic messages with the message IDs defined
    * in this class.
    */
@@ -6638,6 +6648,10 @@
                     "configuration because it includes attribute %s which is " +
                     "not allowed by any of the objectclasses defined in that " +
                     "entry.");
+    registerMessage(MSGID_ENTRY_SCHEMA_ATTR_NO_VALUES,
+                    "Entry %s violates the Directory Server schema " +
+                    "configuration because it includes attribute %s without " +
+                    "any values.");
     registerMessage(MSGID_ENTRY_SCHEMA_ATTR_SINGLE_VALUED,
                     "Entry %s violates the Directory Server schema " +
                     "configuration because it includes multiple values for " +

--
Gitblit v1.10.0