I need to extend default identity 2.0 user profile with some custom attributes. Then, based on such attribute I need to restrict some user actions on a view. E.g., user have a new attribute called Country, then on a page that show all orders, he need to see (or can click/run some action) on only those rows/orders in his country (from attribute).
How can I do this?
Best is to add these custom attributes as a claims when user is logged in. These claims are persisted in auth-cookie and you have very efficient access to these claims while user is logged-in. And then based on weather user has a required claim, then on the page you can show-hide elements.