Permissions & Authorization for Users #24

Initial Release; Includes Database and MVC refactoring
This commit is contained in:
Gary Sharp
2013-10-10 19:13:16 +11:00
parent 172ce5524a
commit a099d68915
458 changed files with 40221 additions and 12130 deletions
@@ -0,0 +1,43 @@
@model Disco.Web.Areas.Config.Models.AuthorizationRole.IndexModel
@{
Authorization.Require(Claims.DiscoAdminAccount);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Authorization Roles");
}
@if (Model.Tokens.Count == 0)
{
<div class="form" style="width: 450px; padding: 100px 0;">
<h2>No authorization roles are configured</h2>
</div>
}
else
{
<table class="tableData">
<tr>
<th>Name
</th>
<th>Linked Groups/Users
</th>
</tr>
@foreach (var item in Model.Tokens)
{
<tr>
<td>
@Html.ActionLink(item.Role.Name, MVC.Config.AuthorizationRole.Index(item.Role.Id))
</td>
<td>
@if (item.SubjectIds.Count == 0)
{
<span class="smallMessage">&lt;None&gt;</span>
}
else
{
@(string.Join(", ", item.SubjectIds.OrderBy(i => i)))
}
</td>
</tr>
}
</table>
}
<div class="actionBar">
@Html.ActionLinkButton("Create Authorization Role", MVC.Config.AuthorizationRole.Create())
</div>