Originally Posted by koosha_pooyeshgar
in chapter 7 it has been discussed how to constrain executing some functions to some roles using Authorize now has it been discussed how to create such roles and assign these roles to specific users??!!
I don't see such and important topic !
If it has been discussed in which page?
It is only mentioned in passing. Webforms has something, the WSAG(?) that you could using during development to set up roles. You can do that now via the SQL table for users, which I don't know enough to say much about right now.
In production roles are set up by database administrators. However, that does not mean that developers don't have to know a little about it, for setting it up and for testing.
I think at the time the book was published Microsoft was developing Windows Identity and moving away from membership, which is what MVC4 used. So they probably had to trash a well-crafted and fun chapter on roles, and replace it with..With what, since they couldn't say what to write about? So there is little in here about how to set it up.
We are supposed to be moving into using Windows Identity for claims, which are better than roles. But I think there are still roles, but I have not gotten my head wrapped around this yet, so I will be quiet (yeah, right! Look at this post!) about it. There are other ways of setting roles such as Active Directory. You might want to do some cruising on the internet to find out how to set users up in roles for testing purposes. You can spend months learning this stuff.