Update mfg mode query to D-Bus interface

Updated manufacturing mode query to be based on D-Bus interface
instead of uint8_t as earlier. This is done to be in sync
with common D-Bus interface

Tested:
With updated special-mode-mgr daemon, which follows the
D-Bus interface
1. Verified that manufacturing mode commands are executed as
before, when in manufacturing mode.

Change-Id: I1828739751272b8d9151e2ab4a32c4861bbe90d7
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
diff --git a/src/manufacturingcommands.cpp b/src/manufacturingcommands.cpp
index 9d81930..8b3d846 100644
--- a/src/manufacturingcommands.cpp
+++ b/src/manufacturingcommands.cpp
@@ -668,7 +668,7 @@
             if (request->payload.size() > 4)
             {
                 // Allow write data count > 1, only if it is in MFG mode
-                if (mtm.getAccessLvl() != MtmLvl::mtmAvailable)
+                if (!mtm.isMfgMode())
                 {
                     return ipmi::ccInsufficientPrivilege;
                 }
@@ -687,7 +687,7 @@
         case makeCmdKey(ipmi::netFnStorage, ipmi::storage::cmdWriteFruData):
 
             // Check for MTM mode
-            if (mtm.getAccessLvl() != MtmLvl::mtmAvailable)
+            if (!mtm.isMfgMode())
             {
                 return ipmi::ccInvalidCommand;
             }
@@ -820,7 +820,7 @@
     // only in MFG mode.
     if (writeCount > 1)
     {
-        if (mtm.getAccessLvl() < MtmLvl::mtmAvailable)
+        if (!mtm.isMfgMode())
         {
             return ipmi::responseInsufficientPrivilege();
         }
@@ -861,8 +861,7 @@
     std::vector<uint8_t> writeData = {0x60, 0x1};
     std::vector<uint8_t> readBuf(0);
 
-    // TODO Needs to enhance the below security checking
-    if (mtm.getAccessLvl() < MtmLvl::mtmAvailable)
+    if (!mtm.isMfgMode())
     {
         return ipmi::responseInsufficientPrivilege();
     }