entity framework 6 - ASP.NET Identity Custom with Group-based Roles -


perhaps i've misunderstood concept of roles in asp.net identity , database model, i'm struggling wrap head around how implement following scenario: asp.net identity, seems user has permissions globally based on role, opposed permissions on more granular level. i'm trying implement db schema in ef6 code-first user can member of several groups. instead of having global role however, want user have 1 role in 1 group, , different role in another.

for example, user can create group, , therefore group admin, teacher in group , therefore able contribute content. same user student in different group, , have different permissions in group result. users can perform multiple roles in given group, , permissions should based on role(s) within group.

from can see isn't intended structure asp.net identity, can't see how limit scope of specific role group. also, ideally i'd able assign user group, , assign group of users group, example have group of users , assign group specific role within group.

what have in mind membership table has userid, groupid , roleid deal mapping roles specific groups, how extend have roles inherited groups, , able leverage asp.net identity me manage these roles or have cook own solution scratch?

take @ if haven't found , you're working mvc.

http://typecastexception.com/post/2014/08/10/aspnet-identity-20-implementing-group-based-permissions-management.aspx

i've been working on same same issue recently. covers lot of requirements there gap - asp.net identity doesn't differentiate between authorization , authentication. in cases, user not have required permission gets sent login screen. that's fine if they're not logged in, not if logged in , trying access have no permission for. address here, haven't had time test yet.

how make authorize attribute return custom 403 error page instead of redirecting logon page


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

Kivy: Swiping (Carousel & ScreenManager) -

jdbc - Not able to establish database connection in eclipse -