Skip to content

Commit

Permalink
HPCC-18674 Clarifies access error message
Browse files Browse the repository at this point in the history
- Re-structures error formating and adds user name

Signed-off-by: Rodrigo Pastrana <rodrigo.pastrana@lexisnexis.com>
  • Loading branch information
rpastrana committed Dec 7, 2017
1 parent a3e77fd commit 93b9db7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esp/services/esdl_svc_engine/esdl_binding.cpp
Expand Up @@ -553,7 +553,8 @@ void EsdlServiceImpl::handleServiceRequest(IEspContext &context,
const char * key = (const char *)cur.getKey();
features.appendf("%s%s:%s", (index++ == 0 ? "" : ", "), key, getSecAccessFlagName(*methaccessmap.getValue(key)));
}
throw MakeStringException(-1, "%s::%s access denied - Required features: %s.", srvdef.queryName(), mthName, features.str());
const char * user = context.queryUserId();
throw MakeStringException(-1, "%s::%s access denied for user '%s' - Method requires: '%s'.", srvdef.queryName(), mthName, (user && *user) ? user : "Anonymous", features.str());
}
}

Expand Down

0 comments on commit 93b9db7

Please sign in to comment.