- @Html.ActionLinkButton("Create Authorization Role", MVC.Config.AuthorizationRole.Create())
+
+
+
+
None Associated
+
+ @foreach (var sg in Model.AdministratorSubjects)
+ {
+ var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
+ @if (sg.IsGroup)
+ {
+ @displayName
+ }
+ else
+ {
+ @displayName
+ }
+ }
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Disco.Web/Areas/Config/Views/AuthorizationRole/Index.generated.cs b/Disco.Web/Areas/Config/Views/AuthorizationRole/Index.generated.cs
index 010e3849..93c07df4 100644
--- a/Disco.Web/Areas/Config/Views/AuthorizationRole/Index.generated.cs
+++ b/Disco.Web/Areas/Config/Views/AuthorizationRole/Index.generated.cs
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.34011
+// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -176,22 +176,315 @@ WriteLiteral(" \r\n");
#line default
#line hidden
-WriteLiteral("\r\n
\r\n
\r\n
None Associated \r\n
\r\n");
+
+
+ #line 46 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+
+
+ #line default
+ #line hidden
+
+ #line 46 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+ foreach (var sg in Model.AdministratorSubjects)
+ {
+ var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
+
+
+ #line default
+ #line hidden
+WriteLiteral(" (sg.IsGroup ? "group" : "user"
+
+ #line default
+ #line hidden
+, 1813), false)
+);
+
+WriteLiteral(" data-subjectid=\"");
+
+
+ #line 49 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+ Write(sg.Id);
+
+
+ #line default
+ #line hidden
+WriteLiteral("\"");
+
+WriteLiteral(">");
+
+
+ #line 49 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+ if (sg.IsGroup)
+ {
+
+
+ #line default
+ #line hidden
+WriteLiteral(" ");
+
+
+ #line 51 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+
+
+ #line default
+ #line hidden
+
+ #line 51 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+ Write(displayName);
+
+
+ #line default
+ #line hidden
+
+ #line 51 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+
+ }
+ else
+ {
+
+
+ #line default
+ #line hidden
+WriteLiteral(" ");
+
+
+ #line 55 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+
+
+ #line default
+ #line hidden
+
+ #line 55 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+ Write(displayName);
+
+
+ #line default
+ #line hidden
+
+ #line 55 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+
+ }
+
+ #line default
+ #line hidden
+WriteLiteral(" \r\n");
+
+
+ #line 57 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
+ }
+
+
+ #line default
+ #line hidden
+WriteLiteral(" \r\n
\r\n
\r\n
+
+\r\n\r\n
\r\n");
+WriteLiteral("\r\n
");
}
}
diff --git a/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.cshtml b/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.cshtml
index cd048b63..1d61e35b 100644
--- a/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.cshtml
+++ b/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.cshtml
@@ -166,12 +166,11 @@
}
function add(){
-
var id = textAdd.val();
$.ajax({
url: '@Url.Action(MVC.API.AuthorizationRole.Subject())',
- method: 'get',
+ method: 'post',
data: { Id: id }
}).done(function(response){
if (response){
diff --git a/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.generated.cs b/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.generated.cs
index 22c80abc..926d26ed 100644
--- a/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.generated.cs
+++ b/Disco.Web/Areas/Config/Views/AuthorizationRole/Show.generated.cs
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.34011
+// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -538,63 +538,63 @@ WriteLiteral("\',\r\n minLength: 2,\r
" }else{\r\n $this.attr(\'data-subjectstatus\', \'r" +
"emoved\').hide();\r\n }\r\n\r\n " +
" updateNoSubjects();\r\n }\r\n\r\n " +
-" function add(){\r\n \r\n " +
-" var id = textAdd.val();\r\n\r\n $.ajax({\r" +
-"\n url: \'");
+" function add(){\r\n var id = textAdd.val()" +
+";\r\n\r\n $.ajax({\r\n " +
+" url: \'");
- #line 173 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
+ #line 172 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
Write(Url.Action(MVC.API.AuthorizationRole.Subject()));
#line default
#line hidden
-WriteLiteral("\',\r\n method: \'get\',\r\n " +
-" data: { Id: id }\r\n }).done(function(re" +
-"sponse){\r\n if (response){\r\n " +
-" if (list.find(\'li[data-subjectid=\"\'+response.Id+\'\"]\').leng" +
-"th == 0){\r\n \r\n " +
-" var liIcon = $(\'\').addClass(\'fa fa-lg\');\r\n " +
-" if (response.Type === \'user\')\r\n " +
-" liIcon.addClass(\'fa-user\');\r\n " +
-" else\r\n liIc" +
-"on.addClass(\'fa-users\');\r\n\r\n var li =" +
-" $(\'\')\r\n .append(liIcon)\r\n " +
-" .append($(\'\').text(response.I" +
-"d == response.Name ? response.Id : response.Name + \' [\' + response.Id + \']\'))\r\n" +
-" .append($(\'\').addClass(\'fa fa" +
-"-times-circle remove\'))\r\n .addCla" +
-"ss(response.Type)\r\n .attr(\'data-s" +
-"ubjectid\', response.Id)\r\n .attr(\'" +
-"data-subjectstatus\', \'new\');\r\n\r\n list" +
-".append(li);\r\n\r\n updateNoSubjects(); " +
-" \r\n " +
-" }else{\r\n alert(\'That subject has alr" +
-"eady been added\');\r\n }\r\n " +
-" }else{\r\n alert(\'Unknow" +
-"n Id\');\r\n }\r\n " +
-"}).fail(function(jqXHR, textStatus, errorThrown){\r\n " +
-" alert(\'Error: \' + errorThrown);\r\n });\r\n " +
-" }\r\n\r\n function updateNoS" +
-"ubjects(){\r\n if (list.find(\'li:visible\').length >" +
-" 0)\r\n noSubjects.hide();\r\n " +
-" else\r\n noSubjects.show();\r\n " +
-" }\r\n\r\n function saveChanges(){\r" +
-"\n var form = $(\'#Config_AuthRoles_Subjects_Update" +
-"_Dialog_Form\').empty();\r\n\r\n list.find(\'li[data-su" +
-"bjectstatus!=\"removed\"]\').each(function(){\r\n " +
-"var subjectId = $(this).attr(\'data-subjectid\');\r\n " +
-" \r\n form.append($(\' \').attr({\r\n " +
-" \'name\': \'Subjects\',\r\n " +
-" \'type\': \'hidden\'\r\n }).val(su" +
-"bjectId));\r\n\r\n }).get();\r\n\r\n " +
-" form.submit();\r\n\r\n dialog.dialog(\"disa" +
-"ble\");\r\n dialog.dialog(\"option\", \"buttons\", null)" +
-";\r\n }\r\n\r\n $(function(){\r\n " +
-" $(\'#Config_AuthRoles_Subjects_Update\').click(show" +
-"Dialog);\r\n });\r\n\r\n })();\r\n " +
-" \r\n \r\n \r\n " +
-"tr>\r\n \r\n \').addClass(\'fa fa-lg\');\r\n " +
+" if (response.Type === \'user\')\r\n " +
+" liIcon.addClass(\'fa-user\');\r\n " +
+" else\r\n liI" +
+"con.addClass(\'fa-users\');\r\n\r\n var li " +
+"= $(\'\')\r\n .append(liIcon)\r\n " +
+" .append($(\'\').text(response." +
+"Id == response.Name ? response.Id : response.Name + \' [\' + response.Id + \']\'))\r" +
+"\n .append($(\'\').addClass(\'fa f" +
+"a-times-circle remove\'))\r\n .addCl" +
+"ass(response.Type)\r\n .attr(\'data-" +
+"subjectid\', response.Id)\r\n .attr(" +
+"\'data-subjectstatus\', \'new\');\r\n\r\n lis" +
+"t.append(li);\r\n\r\n updateNoSubjects();" +
+" \r\n " +
+" }else{\r\n alert(\'That subject has al" +
+"ready been added\');\r\n }\r\n " +
+" }else{\r\n alert(\'Unkno" +
+"wn Id\');\r\n }\r\n " +
+" }).fail(function(jqXHR, textStatus, errorThrown){\r\n " +
+" alert(\'Error: \' + errorThrown);\r\n });\r\n " +
+" }\r\n\r\n function updateNo" +
+"Subjects(){\r\n if (list.find(\'li:visible\').length " +
+"> 0)\r\n noSubjects.hide();\r\n " +
+" else\r\n noSubjects.show();\r\n " +
+" }\r\n\r\n function saveChanges(){" +
+"\r\n var form = $(\'#Config_AuthRoles_Subjects_Updat" +
+"e_Dialog_Form\').empty();\r\n\r\n list.find(\'li[data-s" +
+"ubjectstatus!=\"removed\"]\').each(function(){\r\n " +
+" var subjectId = $(this).attr(\'data-subjectid\');\r\n " +
+" \r\n form.append($(\' \').attr({\r\n " +
+" \'name\': \'Subjects\',\r\n " +
+" \'type\': \'hidden\'\r\n }).val(s" +
+"ubjectId));\r\n\r\n }).get();\r\n\r\n " +
+" form.submit();\r\n\r\n dialog.dialog(\"dis" +
+"able\");\r\n dialog.dialog(\"option\", \"buttons\", null" +
+");\r\n }\r\n\r\n $(function(){\r\n" +
+" $(\'#Config_AuthRoles_Subjects_Update\').click(sho" +
+"wDialog);\r\n });\r\n\r\n })();\r\n " +
+" \r\n \r\n \r\n <" +
+"/tr>\r\n