Global Directory
Global Directory
EXPLORE OUR SITES
London Stock Exchange Group
LSEG Data & Analytics
MyAccount
LSEG Perspectives
London Stock Exchange
FTSE Russell
LCH
Contact Us
Home
TR Internal
Website - Restrict display header item to internal users only.
Rao Gutta
Hi
I have a sub header tab control on my product web site.I need to restrict one header item to display only to internal users. I used the [RestrictToInternalIPAddress] decorator in controller class. My question is how can I do that in HTML code?
Thanks
Rao Gutta
Find more posts tagged with
hardware
refinitiv-internal
Accepted answers
mark.maruska
In the **controller**, use the code
Controller.IsInternalIPAddressUser(this.Request)
.
If you're in an **ascx/aspx (view)**, then turn that into some property on the model (from the controller to the view).
If you need to know within the **client-side browser**, then design the server-side code to only respond with the parts needed so there is no client-side logic; since the client-side logic could be hacked by an external source to see the internal items or execute the internal action when that is supposed to only be available for internal users.
I hope that helps!
All comments
mark.maruska
This is for Cobalt Website, right?
Rao Gutta
Yes. I am working on Analytics product.
mark.maruska
In the **controller**, use the code
Controller.IsInternalIPAddressUser(this.Request)
.
If you're in an **ascx/aspx (view)**, then turn that into some property on the model (from the controller to the view).
If you need to know within the **client-side browser**, then design the server-side code to only respond with the parts needed so there is no client-side logic; since the client-side logic could be hacked by an external source to see the internal items or execute the internal action when that is supposed to only be available for internal users.
I hope that helps!
Quick Links
All Forums
Recent Questions
Terms of use
Privacy & Cookie Statement
Cookies settings
Do not sell my info
Whistleblowing
UK Bribery Act
Modern Slavery Act