Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can certainly use forms authentication and utilize the default aspnet_Users and aspnet_Roles tables to handle things like login accounts and the various roles that you might have for the site, and then assign the roles to the users. That'll allow you to <code>[Authorize(Roles = "Administrators")]</code> your controller actions to control who can do what. You could set up a "Project Manager" role at this level and assign that, if it makes sense to control the DB based on that designation. If not, you could put that information in your own table.</p> <p>In my case I needed to associate data with users and so I created an application-specific Users table in my own database and then linked the aspnetdb Users table row for a user to the application's Users table by adding a Guid column to my own Users table and populated that with the UserId from the aspnet_Users table data. That way when the a user logged into the system, I could retrieve the appropriate data (e.g., "My recipes"). There may be different/better ways to solve this problem, but that's what I ended up doing for my own situation. In my application's db, I just created my own tables to handle things like your Users and Groups since there were quite a few fields of interest. I didn't want to alter the tables in the aspnetdb at all. I'll be interested, however, to hear what other folks think.</p> <p>You can see a question I posted about this subject <a href="https://stackoverflow.com/questions/7319568/associating-data-with-a-user">here</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload