TO BE CLEAR:
I have two groups of users –
GroupA – User1, User2
GroupB – User3, User4
Group A does TaskA and creates TaskA Object
Group B does TaskB and creates TaskB Object
Role based prevents GroupA from editing TaskB Object and vice versa
The ISSUE – User1 can still edit User2’s TaskA Object
I have integrated SqlMembership into my custom database and in my custom tables I have a UserId field which maps to the GUID AspNet_UserId column in AspNet_User Table. A user can create a job, and it is associated with the user’s AspNet_UserId.
My issue is I have Role based security but I also must set security so only only User with UserId can access edit view that has model data containing his UserId.
I have looked at this post – ASP.NET MVC 3 using Authentication
(BUT the first part of the answer with 29 upvotes seems incomplete)
The Solution –
I haven’t implemented this yet but from what I see this is what I am looking for. I found it here: http://forums.asp.net/t/1771733.aspx/1?Display+a+specific+data+for+User
This will hopefully save me from having to look at WIF…
(Keeping my fingers crossed)
Employee Controller:
Index View