This commit is contained in:
@@ -492,10 +492,15 @@ namespace AyaNova
|
||||
//check if token has j value set
|
||||
if (context.Request.IsLocal())
|
||||
{
|
||||
if (context.User.Claims.FirstOrDefault(c => c.Type == "j") != null)
|
||||
//if this is a generate report internal token this will be the override language set
|
||||
//and it's existance is enough to indicate it was set internally by this server
|
||||
var rpl=context.User.Claims.FirstOrDefault(c => c.Type == "rpl");
|
||||
if ( rpl!= null)
|
||||
{
|
||||
//it's a local request, the jwt already passed earlier so we issued it and it has the correct claim set so allow it
|
||||
bLocalReportRenderRequest = true;
|
||||
//set override language
|
||||
context.Request.HttpContext.Items["AY_TRANSLATION_ID"]=Convert.ToInt64(rpl.Value);
|
||||
await next.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user