I am not quite sure if I am managing the user roles appropriately in an ASP.NET application. Is such an approach is correct, or incorrect or can be improved?
All the user's are added to the users table in the database, which have fields for example: (userid, name, surname, isAdmin)
In my application, I get the user id using
Request.Servervariables.Get("LOGON_USER")
and while rendering a page, I run an SQL Query to check if the current user on that page, has 'isAdmin' parameter ='true' in my SQL Server. Then if yes, I render and make the appropriate controls visible. (For example, a link button to the Administrator page)