Last post May 02, 2014 08:41 AM by aspDotNetNoob
Apr 30, 2014 06:58 AM|aspDotNetNoob|LINK
With the new release of identity 2 I am wondering if there is inbuilt support for defining roles on a group basis AND user basis.
Clearly you can define many roles per user using .HasMany() with EF6 but is there a way to define different roles based on a group the user is allocated to? Whereby the users can be in many groups.
user1 is a member of groups A,B,C
and has Permissions:
groupA: see, no edit
groupB: basic admin rights
groupC: full admin rights
can I map users to groups and roles in this way? I need to be able to do the following:
See list of groups
See users in each group
See list of users
See list of groups each user is part of
Which are do-able but also:
See user rank in each list of users (e.g. lists for users in a group and list of groups a user is a member of)
Many thanks for any guidence
Further consideration has led to me to the idea of defining roles named via "groupName_RoleType"
However I still have the issue of getting a list of admins for a specific group without searching every role of every user.
May 02, 2014 02:23 AM|Ericzh|LINK
Hope below links help:
May 02, 2014 08:41 AM|aspDotNetNoob|LINK
Thank you for these links, unfortunately I have read them and unsure how they help - my issue is getting a one to many relationship working with the new applicationuser class. If anybody can provide that, then everything else should be sorted easily. I just
can't seem to add a property to the class - it compiles and runs fine, but no table is generated! Please see my updated attempts:
(I don't like posting in two forums but I'm in a dead end at the moment!)