Last post Mar 06, 2015 10:26 AM by ColinM
Mar 05, 2015 01:28 PM|ColinM|LINK
I have been working through the security tutorials and have learned most of what I need, but
I am looking to expand the validation to have a username / password and the addition of a location, so three items of security
as I am having users from multiple locations log in, but have them able to only see their locations data
Would appreciate any guidance or links to tutorials on this method
Mar 06, 2015 01:22 AM|Michelle Ge - MSFT|LINK
According to your description, you want to add the location as the permission to see which data. So far as I know, if you want to get the location, you need to get the IP then get the Country or City from the Ip by the code below:
userHost = Request.UserHostAddress;
Then in the Data Structure, you need add the location field, the same time, you need to filter data by the location field. Also you can create a table where you will set access for all the pages by the location. For example, as we get a location from a user,
we need to get all the pages which this user can see from the access table by the location.
Hope it's useful for you.
Mar 06, 2015 10:26 AM|ColinM|LINK
Thanks for your response, I guess I just wasnt clear enough !
When a user logs into the system, I want to use a username, password and location variable,
The user will already be in the database as 'Joe Smoe', password 'Smoe' and location 'New York'
so that user validates the username, password and location.
hope this makes it a little clearer !