Event Hub: Identifying the Originating Request

Posted by Community Admin on 04-Aug-2018 19:37

Event Hub: Identifying the Originating Request

All Replies

Posted by Community Admin on 04-Sep-2014 00:00

Hi,

 I'm using the EventHub events RoleAssigned and RoleUnassigned in some custom integration code to sync user data from Sitefinity to another system.

When I update a role for a user through my integration code the event fires and when I update a role for a user in Sitefinity the event fires.

 Is there any way to determine where the originating request to Assign/Unassign a role came from, my custom code or from the Sitefinity UI?

 Thanks,
Steve

Posted by Community Admin on 09-Sep-2014 00:00

Hello Steve,

Unfortunately the eventInfo does not carry such information, so I would suggest to use the UrlReferrer in order to determine where from the request is coming form. 

var source = HttpContext.Current.Request.UrlReferrer.AbsolutePath

This way you can get the page from which this has been invoked.

Regards,
Pavel Benov
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 09-Sep-2014 00:00

Thanks Pavel,

That is what I am using now but I was hoping for a more graceful method.

Thanks again,
Steve

This thread is closed