entity framework - Allow asp.net sqlmembership users to create "subusers" -


i've tried searching days , can't seem find adequate answer i'll ask here.

i'm building asp.net membership website.

what want is:

allow user create account - usera want allow usera create "sub accounts" tied account, different roles different login names (i'll using email address login name)

usera account admin of sorts. usera's sub accounts less "adminish" usera, data write db (entity framework) still tied main usera account referenced tables via membership.getuser() api calls.

so 2 questions:

1) how reference membership tables in entitydatamodel using db first (i ran aspnet_regsql.exe)

2) how need go allowing usera create own sub users?

here's image of custom tables:

[masteraccountuser] masteraccountid = aspnet_membership.userid accountnumber = autoincrement number  [useraccount] - subaccount of [masteruseraccount] accountid = aspnet_membership.userid (if have have  each user create own) masteraccountid = aspnet_membership.userid (but same 1 [masteraccountuser] 

enter image description here

if vague, let me know , can expand.

i able work.

basically, standard aspnetdb.mdf in-place security features. add table same fields, , reference the

membershipuser.getuser(page.user.identity.name); 

so own table have "masteruser" user.providerkey. every "sub-user" has same masteruser guid on record fall under same account.

if want more details on how got work, can happily provide them.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -