开发者

User specific user management

I'm working on a website where I would like to register paid users. These user will buy a subscription and be able to register a set number of users under this subscription. Once a user is registered I would like the user to be a moderator of sorts with the ability to create user accounts for access to the site under there subscription.

Most of the membership solutions I have found on-line are based around a singularly administrator managing all the users on a site. I would like a registered user to be able to generate user-names and passwords and administrate the users they have created. It is this linkage that I am finding difficult and am struggling to find article on the subject.

I have provided two tables below.

Option1: Add a table that simply contains the id of the users referenced to the user id who created this user

Userid firstname last

1 tim boo

2 jim foo

3 slim bar

Userid CreatorUserid

2 1

3 1

4 1

Option2: Add CreatorUserID to the users information to reference them to a specific user

Userid firstname last CreatorUserID

1 tim boo Null

2 jim foo 1

3 slim bar 1

Both solutions leverage the default MVC asp.net membership. I have used this as a base but I welcome any other suggestions as to methods of li开发者_运维百科nking users to the user who created there profile. In the perfect world I would love find a similar code project or a tutorial to build a solution similar to this!

Essential I am looking for advice onto how to achieve such interaction and possibly some advice as to how to structure the database. I was attempting to use default asp.net MVC membership with as minimal customisation as possible but this may not be a good idea?

I would also welcome ideas on how to structure the database should I add a third or fourth tier to this solution i.e. "user A" creates "User B" and "user C" creates "User D" but "User E" is the manager of "user A" and "user C" and would like access all these users. Provisionally though if anyone has any ideas, articles, tutorials or code projects in mind that could help me with the first part of my question I would appreciate it!!!!


Decide on a structure similar to the default asp.net membership. Simply added a index table referencing user to user. It is sufficing as a solution in my current release.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜