RAKP12: Don't allow user with NOACCESS priv.

Don't allow user to establish session with NOACCESS
user privilege.

Tested-by:
1. Updated the user privilege to NO_ACCESS and verified
RMCP+ session establishement errors out.

Change-Id: I787a787a3198a7e0550ac01962e69aab0041cccf
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
diff --git a/command/rakp12.cpp b/command/rakp12.cpp
index 59ca9e3..a8d5171 100644
--- a/command/rakp12.cpp
+++ b/command/rakp12.cpp
@@ -187,6 +187,12 @@
             static_cast<uint8_t>(RAKP_ReturnCode::INACTIVE_ROLE);
         return outPayload;
     }
+    if (userAccess.privilege > static_cast<uint8_t>(session::Privilege::OEM))
+    {
+        response->rmcpStatusCode =
+            static_cast<uint8_t>(RAKP_ReturnCode::INACTIVE_ROLE);
+        return outPayload;
+    }
     session->chNum = chNum;
     // minimum privilege of Channel / User / session::privilege::USER/CALLBACK /
     // has to be used as session current privilege level