MVC Security Model / Database MVC - What are my options?

We have several projects (ASP.NET MVC) that require the Role / User / Permissions security model. We want to store this data in tables in our database. How to make your recommendation, we are going to implement this security model using our ASP.NET MVC projects? Use custom authentication attributes that will determine if the user is allowed to interact with the data model in our database?

Are third party / open source options available?

+3
source share
3 answers

Entity Framework, MVC EF. http://efmembership.codeplex.com/

+2

, , - , asp.net, , /.

-, authorize , "" , , onactionexecuting.

+1

I use Rhino Security for a complex MVC site and love it.

http://ayende.com/Blog/archive/2008/01/22/Rhino-Security-Overview-Part-I.aspx

Enabling security calls is as follows:

     permissionBuilderService
                .Allow("/[Controller]", 1)
                .For("GAAdmins", 1)
                .OnEverything()
                .DefaultLevel()
                .Save();

authorizationRepository.AssociateUserWith(user, "GAAdmins"); 


if (authService.IsAllowed(user, "/[Controller]/[Action]"))
 ...;
0
source

Source: https://habr.com/ru/post/1789839/


All Articles