1

I'm beginning work on a web application that will have several distinct user types, example being Registered User, Site Admin, User Admin..etc. Users may have more than 1 role.

In previous projects, I've been able to manage different user schemas with 3 tables: User, UserRole, User_UserRole. With this approach, it was relatively easy to manage the M-M relationship between User and UserRole (in User_UserRole table).

However, I don't think this approach will work so nicely in this project for the following reason. I need to be able to track who (site admin or user admin) approves each user.

I haven't been able to come up with any elegant solution for this, and am looking for some suggestions. The simpler the better.

user163757
  • 6,795
  • 9
  • 32
  • 47
  • 1
    Jim provided the simplest solution. The fact that you couldn't figure that out on your own suggests you might already be in over your head. (That's an observation, not a criticism.) It's kind of like saying, "I'm developing this program, and I've declared five variables, but I need six, and I don't know what to do." – Mike Sherrill 'Cat Recall' Jul 03 '11 at 09:51

1 Answers1

1

Just include a granted_by column in the User_UserRole table that points to the User table.

Jim
  • 72,985
  • 14
  • 101
  • 108