2 |
3 | @{
4 | ViewBag.Title = "Users";
5 | }
6 |
7 | Application Users
8 |
9 |
10 | @Html.ActionLink("Create New", "Register")
11 |
12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.UserName)
16 | |
17 |
18 | @Html.DisplayNameFor(model => model.FirstName)
19 | |
20 |
21 | @Html.DisplayNameFor(model => model.LastName)
22 | |
23 |
24 | @Html.DisplayNameFor(model => model.Email)
25 | |
26 | |
27 |
28 |
29 | @foreach (var item in Model) {
30 |
31 |
32 | @Html.DisplayFor(modelItem => item.UserName)
33 | |
34 |
35 | @Html.DisplayFor(modelItem => item.FirstName)
36 | |
37 |
38 | @Html.DisplayFor(modelItem => item.LastName)
39 | |
40 |
41 | @Html.DisplayFor(modelItem => item.Email)
42 | |
43 |
44 | @Html.ActionLink("Edit", "Edit", new { id = item.UserName }) |
45 | @Html.ActionLink("Groups", "UserGroups", new { id = item.UserName }) |
46 | @Html.ActionLink("Delete", "Delete", new { id = item.UserName })
47 | @Html.ActionLink("Effective Permissions", "UserPermissions", new { id = item.UserName })
48 | |
49 |
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Account/Login.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.LoginViewModel
2 |
3 | @{
4 | ViewBag.Title = "Log in";
5 | }
6 |
7 | @ViewBag.Title.
8 |
51 | @section Scripts {
52 | @Scripts.Render("~/bundles/jqueryval")
53 | }
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Account/Manage.cshtml:
--------------------------------------------------------------------------------
1 | @using AspNetRoleCustomization.Models;
2 | @using Microsoft.AspNet.Identity;
3 | @{
4 | ViewBag.Title = "Manage Account";
5 | }
6 |
7 | @ViewBag.Title.
8 |
9 | @ViewBag.StatusMessage
10 |
11 |
12 | @if (ViewBag.HasLocalPassword)
13 | {
14 | @Html.Partial("_ChangePasswordPartial")
15 | }
16 | else
17 | {
18 | @Html.Partial("_SetPasswordPartial")
19 | }
20 |
21 |
22 | @section Scripts {
23 | @Scripts.Render("~/bundles/jqueryval")
24 | }
25 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Account/Register.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.RegisterViewModel
2 | @{
3 | ViewBag.Title = "Register";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Create a new account.
12 |
13 | @Html.ValidationSummary()
14 |
20 |
26 |
32 |
33 | //Add the LastName, FirstName, and Email Properties:
34 |
40 |
41 |
47 |
48 |
54 |
55 |
60 | }
61 |
62 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Account/UserGroups.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.SelectUserGroupsViewModel
2 |
3 | @{
4 | ViewBag.Title = "User Groups";
5 | }
6 |
7 | Group Assignments for user @Html.DisplayFor(model => model.UserName)
8 |
9 |
10 | @using (Html.BeginForm("UserGroups", "Account", FormMethod.Post, new { encType = "multipart/form-data", name = "myform" }))
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
47 | }
48 |
49 |
50 | @Html.ActionLink("Back to List", "Index")
51 |
52 |
53 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Account/UserPermissions.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.UserPermissionsViewModel
2 | @{
3 | ViewBag.Title = "UserPermissions";
4 | }
5 |
6 | Effective Role Permissions for user: @Html.DisplayFor(model => model.UserName)
7 |
8 |
9 |
10 |
11 |
12 | Role Permission
13 | |
14 |
15 | Description
16 | |
17 | |
18 |
19 |
20 | @foreach (var item in Model.Roles)
21 | {
22 |
23 |
24 | @Html.DisplayFor(modelItem => item.RoleName)
25 | |
26 |
27 | @Html.DisplayFor(modelItem => item.Description)
28 | |
29 |
30 | }
31 |
32 |
33 |
34 |
35 | @Html.ActionLink("Back to List", "Index")
36 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Account/_ChangePasswordPartial.cshtml:
--------------------------------------------------------------------------------
1 | @using Microsoft.AspNet.Identity
2 | @model AspNetRoleCustomization.Models.ManageUserViewModel
3 |
4 | You're logged in as @User.Identity.GetUserName().
5 |
6 | @using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
7 | {
8 | @Html.AntiForgeryToken()
9 | Change Password Form
10 |
11 | @Html.ValidationSummary()
12 |
18 |
24 |
30 |
31 |
36 | }
37 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Account/_SetPasswordPartial.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.ManageUserViewModel
2 |
3 |
4 | You do not have a local username/password for this site. Add a local
5 | account so you can log in without an external login.
6 |
7 |
8 | @using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 |
12 | Create Local Login
13 |
14 | @Html.ValidationSummary()
15 |
21 |
27 |
32 | }
33 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Groups/Create.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.Group
2 |
3 | @{
4 | ViewBag.Title = "Create Groups";
5 | }
6 |
7 | Create a new Group
8 |
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
33 | }
34 |
35 |
36 | @Html.ActionLink("Back to List", "Index")
37 |
38 |
39 | @section Scripts {
40 | @Scripts.Render("~/bundles/jqueryval")
41 | }
42 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Groups/Delete.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.Group
2 |
3 | @{
4 | ViewBag.Title = "Delete";
5 | }
6 |
7 | Delete
8 |
9 | Are you sure you want to delete this?
10 |
11 |
Group
12 |
13 |
14 | -
15 | @Html.DisplayNameFor(model => model.Name)
16 |
17 |
18 | -
19 | @Html.DisplayFor(model => model.Name)
20 |
21 |
22 |
23 |
24 | @using (Html.BeginForm()) {
25 | @Html.AntiForgeryToken()
26 |
27 |
28 | |
29 | @Html.ActionLink("Back to List", "Index")
30 |
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Groups/Details.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.Group
2 |
3 | @{
4 | ViewBag.Title = "Details";
5 | }
6 |
7 | Details
8 |
9 |
10 |
Group
11 |
12 |
13 | -
14 | @Html.DisplayNameFor(model => model.Name)
15 |
16 |
17 | -
18 | @Html.DisplayFor(model => model.Name)
19 |
20 |
21 |
22 |
23 |
24 | @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
25 | @Html.ActionLink("Back to List", "Index")
26 |
27 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Groups/Edit.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.Group
2 |
3 | @{
4 | ViewBag.Title = "Edit";
5 | }
6 |
7 | Edit
8 |
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
34 | }
35 |
36 |
37 | @Html.ActionLink("Back to List", "Index")
38 |
39 |
40 | @section Scripts {
41 | @Scripts.Render("~/bundles/jqueryval")
42 | }
43 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Groups/GroupRoles.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.SelectGroupRolesViewModel
2 |
3 | @{
4 | ViewBag.Title = "Group Roles";
5 | }
6 |
7 | Permissions for Group @Html.DisplayFor(model => model.GroupName)
8 |
9 |
10 | @using (Html.BeginForm("GroupRoles", "Groups", FormMethod.Post, new { encType = "multipart/form-data", name = "myform" }))
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
53 | }
54 |
55 |
56 | @Html.ActionLink("Back to List", "Index")
57 |
58 |
59 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Groups/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model IEnumerable
2 |
3 | @{
4 | ViewBag.Title = "Index";
5 | }
6 |
7 | Groups
8 |
9 |
10 | @Html.ActionLink("Create New", "Create")
11 |
12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.Name)
16 | |
17 | |
18 |
19 |
20 | @foreach (var item in Model) {
21 |
22 |
23 | @Html.DisplayFor(modelItem => item.Name)
24 | |
25 |
26 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
27 | @Html.ActionLink("Permissions", "GroupRoles", new { id=item.Id }) |
28 | @Html.ActionLink("Delete", "Delete", new { id=item.Id })
29 | |
30 |
31 | }
32 |
33 |
34 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Home/About.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "About";
3 | }
4 | @ViewBag.Title.
5 | @ViewBag.Message
6 |
7 | Use this area to provide additional information.
8 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Home/Contact.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Contact";
3 | }
4 | @ViewBag.Title.
5 | @ViewBag.Message
6 |
7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P:
11 | 425.555.0100
12 |
13 |
14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com
17 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Home Page";
3 | }
4 |
5 |
6 |
ASP.NET
7 |
ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.
8 |
Learn more »
9 |
10 |
11 |
12 |
13 |
Getting started
14 |
15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
16 | enables a clean separation of concerns and gives you full control over markup
17 | for enjoyable, agile development.
18 |
19 |
Learn more »
20 |
21 |
22 |
Get more libraries
23 |
NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.
24 |
Learn more »
25 |
26 |
27 |
Web Hosting
28 |
You can easily find a web hosting company that offers the right mix of features and price for your applications.
29 |
Learn more »
30 |
31 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Roles/Create.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.ApplicationRole
2 |
3 | @{
4 | ViewBag.Title = "Create";
5 | }
6 |
7 | Create
8 |
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
41 | }
42 |
43 |
44 | @Html.ActionLink("Back to List", "Index")
45 |
46 |
47 | @section Scripts {
48 | @Scripts.Render("~/bundles/jqueryval")
49 | }
50 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Roles/Delete.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.ApplicationRole
2 |
3 | @{
4 | ViewBag.Title = "Delete";
5 | }
6 |
7 | Delete
8 |
9 | Are you sure you want to delete this?
10 |
11 |
ApplicationRole
12 |
13 |
14 | -
15 | @Html.DisplayNameFor(model => model.Name)
16 |
17 |
18 | -
19 | @Html.DisplayFor(model => model.Name)
20 |
21 |
22 | -
23 | @Html.DisplayNameFor(model => model.Description)
24 |
25 |
26 | -
27 | @Html.DisplayFor(model => model.Description)
28 |
29 |
30 |
31 |
32 | @using (Html.BeginForm()) {
33 | @Html.AntiForgeryToken()
34 |
35 |
36 | |
37 | @Html.ActionLink("Back to List", "Index")
38 |
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Roles/Details.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.ApplicationRole
2 |
3 | @{
4 | ViewBag.Title = "Details";
5 | }
6 |
7 | Details
8 |
9 |
10 |
ApplicationRole
11 |
12 |
13 | -
14 | @Html.DisplayNameFor(model => model.Name)
15 |
16 |
17 | -
18 | @Html.DisplayFor(model => model.Name)
19 |
20 |
21 | -
22 | @Html.DisplayNameFor(model => model.Description)
23 |
24 |
25 | -
26 | @Html.DisplayFor(model => model.Description)
27 |
28 |
29 |
30 |
31 |
32 | @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
33 | @Html.ActionLink("Back to List", "Index")
34 |
35 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Roles/Edit.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.ApplicationRole
2 |
3 | @{
4 | ViewBag.Title = "Edit";
5 | }
6 |
7 | Edit
8 |
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
42 | }
43 |
44 |
45 | @Html.ActionLink("Back to List", "Index")
46 |
47 |
48 | @section Scripts {
49 | @Scripts.Render("~/bundles/jqueryval")
50 | }
51 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Roles/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model IEnumerable
2 |
3 | @{
4 | ViewBag.Title = "Index";
5 | }
6 |
7 | Index
8 |
9 |
10 | @Html.ActionLink("Create New", "Create")
11 |
12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.Name)
16 | |
17 |
18 | @Html.DisplayNameFor(model => model.Description)
19 | |
20 | |
21 |
22 |
23 | @foreach (var item in Model) {
24 |
25 |
26 | @Html.DisplayFor(modelItem => item.Name)
27 | |
28 |
29 | @Html.DisplayFor(modelItem => item.Description)
30 | |
31 |
32 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
33 | @Html.ActionLink("Details", "Details", new { id=item.Id }) |
34 | @Html.ActionLink("Delete", "Delete", new { id=item.Id })
35 | |
36 |
37 | }
38 |
39 |
40 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Shared/EditorTemplates/SelectGroupEditorViewModel.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.SelectGroupEditorViewModel
2 | @Html.HiddenFor(model => model.GroupId)
3 | @Html.HiddenFor(model => model.GroupName)
4 |
5 |
6 | @Html.CheckBoxFor(model => model.Selected)
7 | |
8 |
9 | @Html.DisplayFor(model => model.GroupName)
10 | |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Shared/EditorTemplates/SelectRoleEditorViewModel.cshtml:
--------------------------------------------------------------------------------
1 | @model AspNetRoleCustomization.Models.SelectRoleEditorViewModel
2 | @Html.HiddenFor(model => model.RoleName)
3 |
4 |
5 | @Html.CheckBoxFor(model => model.Selected)
6 | |
7 |
8 | @Html.DisplayFor(model => model.RoleName)
9 | |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Shared/Error.cshtml:
--------------------------------------------------------------------------------
1 | @model System.Web.Mvc.HandleErrorInfo
2 |
3 | @{
4 | ViewBag.Title = "Error";
5 | }
6 |
7 | Error.
8 | An error occurred while processing your request.
9 |
10 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | @ViewBag.Title - My ASP.NET Application
7 | @Styles.Render("~/Content/css")
8 | @Scripts.Render("~/bundles/modernizr")
9 |
10 |
11 |
12 |
13 |
14 |
22 |
23 |
24 | - @Html.ActionLink("Home", "Index", "Home")
25 | - @Html.ActionLink("About", "About", "Home")
26 | - @Html.ActionLink("Contact", "Contact", "Home")
27 | - @Html.ActionLink("Users", "Index", "Account")
28 | - @Html.ActionLink("Groups", "Index", "Groups")
29 | - @Html.ActionLink("Permissions", "Index", "Roles")
30 |
31 |
32 | @Html.Partial("_LoginPartial")
33 |
34 |
35 |
36 |
37 | @RenderBody()
38 |
39 |
42 |
43 |
44 | @Scripts.Render("~/bundles/jquery")
45 | @Scripts.Render("~/bundles/bootstrap")
46 | @RenderSection("scripts", required: false)
47 |
48 |
49 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Shared/_LoginPartial.cshtml:
--------------------------------------------------------------------------------
1 | @using Microsoft.AspNet.Identity
2 | @if (Request.IsAuthenticated)
3 | {
4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
5 | {
6 | @Html.AntiForgeryToken()
7 |
8 |
9 | -
10 | @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" })
11 |
12 | - Log off
13 |
14 | }
15 | }
16 | else
17 | {
18 |
19 | - @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/_Layout.cshtml";
3 | }
4 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/AspNetRoleCustomization/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xivSolutions/AspNetAdvancedRoleManagement/032526e015a5fd03d2da6e8812624da59b624a08/AspNetRoleCustomization/favicon.ico
--------------------------------------------------------------------------------
/AspNetRoleCustomization/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xivSolutions/AspNetAdvancedRoleManagement/032526e015a5fd03d2da6e8812624da59b624a08/AspNetRoleCustomization/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/AspNetRoleCustomization/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xivSolutions/AspNetAdvancedRoleManagement/032526e015a5fd03d2da6e8812624da59b624a08/AspNetRoleCustomization/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/AspNetRoleCustomization/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xivSolutions/AspNetAdvancedRoleManagement/032526e015a5fd03d2da6e8812624da59b624a08/AspNetRoleCustomization/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/AspNetRoleCustomization/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ASP.NET Advanced Role-Based Management
2 | ======================================
3 |
4 | This is an example project to accompany a blog post describing a somewhat more complex approach to managing application authorization by creating groups of roles, to which individual users may be added or removed.
5 |
6 | The objective is to use the `[Authorize]` attribute to establish fine-grained roles at the application level, and then create Groups to which these roles are added. In this way, groups of "premissions" may be configured, and then users can be assigned to one or more of these "role groups," making assignment of application roles potentially parallell real-world user organization roles.
7 |
8 | This project builds upon the foundation created by another example, [ASP.NET Role-Based Security Example][3], covered in the article [Extending Identity Accounts and Implementing Role-Based Authentication in ASP.NET MVC 5][1]
9 |
10 | You will need to enable Nuget Package Restore in Visual Studio in order to download and restore Nuget packages during build. If you are not sure how to do this, see [Keep Nuget Packages Out of Source Control with Nuget Package Manager Restore][2]
11 |
12 | You will also need to run Entity Framework Migrations `Update-Database` command per the article. The migration files are included in the repo, so you will NOT need to `Enable-Migrations` or run `Add-Migration Init`.
13 |
14 | [1]: http://www.typecastexception.com/post/2013/11/11/Extending-Identity-Accounts-and-Implementing-Role-Based-Authentication-in-ASPNET-MVC-5.aspx "Extending Identity Accounts and Implementing Role-Based Authentication in ASP.NET MVC 5"
15 |
16 | [2]: http://www.typecastexception.com/post/2013/11/10/Keep-Nuget-Packages-Out-of-Source-Control-with-Nuget-Package-Manager-Restore.aspx "Keep Nuget Packages Out of Source Control with Nuget Package Manager Restore"
17 |
18 | [3]: https://github.com/xivSolutions/AspNetRoleBasedSecurityExample "ASP.NET Role-Based Security Example"
19 |
--------------------------------------------------------------------------------