lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 808ebf4 2/4: Block the MDB DBO for products t


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 808ebf4 2/4: Block the MDB DBO for products that don't allow it
Date: Wed, 16 Jan 2019 15:24:18 -0500 (EST)

branch: master
commit 808ebf41ddef5fa63f5b98f120e02a7be34603fc
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Block the MDB DBO for products that don't allow it
    
    Fancier code to restrict DBO changes will soon be wanted. Meanwhile,
    this change at least prevents end users from using MDB by accident,
    while freely allowing testing for the time being.
---
 input_realization.cpp | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/input_realization.cpp b/input_realization.cpp
index f3af1ab..166859e 100644
--- a/input_realization.cpp
+++ b/input_realization.cpp
@@ -582,7 +582,19 @@ std::string Input::RealizeDeathBenefitOption()
             );
         }
 
-    // DBO3 !! Need rules for MDB as well.
+    if
+        (   !database_->query<bool>(DB_AllowDboMdb)
+        &&  contains(DeathBenefitOptionRealized_, mce_dbopt("MDB"))
+        // DBO3 !! For testing convenience--remove later.
+        &&  !global_settings::instance().ash_nazg()
+        )
+        {
+        return
+            ("Policy form forbids MDB death benefit option."
+            );
+        }
+
+    // DBO3 !! Need rules for changes to and from MDB as well.
     return "";
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]