Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros.hpp File Reference
Include dependency graph for Macros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 opentxs
 

Macros

#define NYM_IS_ALLOWED(SZ_NYM_ID, BOOL_VAR_NAME)
 
#define OT_ENFORCE_PERMISSION_MSG(BOOL_VAR_NAME)
 

Macro Definition Documentation

#define NYM_IS_ALLOWED (   SZ_NYM_ID,
  BOOL_VAR_NAME 
)
Value:
((BOOL_VAR_NAME) || \
((ServerSettings::GetOverrideNymID().size() > 0) && \
(0 == ServerSettings::GetOverrideNymID().compare((SZ_NYM_ID)))))

Definition at line 146 of file Macros.hpp.

#define OT_ENFORCE_PERMISSION_MSG (   BOOL_VAR_NAME)
Value:
{ \
const char* pNymAllowedIDStr = theMessage.m_strNymID.Get(); \
const char* pActionNameStr = theMessage.m_strCommand.Get(); \
\
if (false == NYM_IS_ALLOWED(pNymAllowedIDStr, BOOL_VAR_NAME)) { \
OTLog::vOutput(0, "Nym %s attempted an action (%s), but based on " \
"server configuration, he's not allowed.\n", \
pNymAllowedIDStr, pActionNameStr); \
return false; \
} \
}
#define NYM_IS_ALLOWED(SZ_NYM_ID, BOOL_VAR_NAME)
Definition: Macros.hpp:146

Definition at line 151 of file Macros.hpp.