*/
// check if this user is permitted to do this action with this message
I_Subject subjSecCtx = sessionSecCtx.getSubject();
SessionHolder sessionHolder = new SessionHolder(sessionInfo, addressServer);
DataHolder dataHolder = new DataHolder(action, msgUnit);
if (!sessionSecCtx.isAuthorized(sessionHolder, dataHolder)) {
String key = (msgUnit.getKeyData()==null) ? msgUnit.getKey() : msgUnit.getKeyData().getUrl();
throw new XmlBlasterException(glob, ErrorCode.USER_SECURITY_AUTHORIZATION_NOTAUTHORIZED, ME,
"Subject '" + subjSecCtx.getName() + "' is not permitted to perform action '" + action +
"' on key '" + key + "'" +
((dataHolder.getNotAuthorizedInfo()==null)?"":": "+dataHolder.getNotAuthorizedInfo()));
}
return msgUnit;
}