Feature #43: Specify Admins at Initial Config
Disco Administrators can be specified during the Initial Configuration
This commit is contained in:
@@ -243,7 +243,8 @@ namespace Disco.Services.Logging
|
||||
.WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 0)) // Midnight
|
||||
.Build();
|
||||
|
||||
_ReInitializeScheduler.ScheduleJob(reInitalizeJobDetail, reInitalizeTrigger);
|
||||
if (!_ReInitializeScheduler.CheckExists(reInitalizeTrigger.Key))
|
||||
_ReInitializeScheduler.ScheduleJob(reInitalizeJobDetail, reInitalizeTrigger);
|
||||
}
|
||||
|
||||
private LogContext(string PersistantStorePath, string PersistantStoreConnectionString)
|
||||
|
||||
@@ -141,6 +141,7 @@ else
|
||||
}
|
||||
|
||||
updateNoSubjects();
|
||||
return false;
|
||||
}
|
||||
|
||||
function add() {
|
||||
@@ -152,7 +153,7 @@ else
|
||||
data: { Id: id }
|
||||
}).done(function (response) {
|
||||
if (response) {
|
||||
if (list.find('li[data-subjectid="' + response.Id + '"]').length == 0) {
|
||||
if (list.find('li[data-subjectid="' + response.Id.replace('\\', '\\\\') + '"]').length == 0) {
|
||||
|
||||
var liIcon = $('<i>').addClass('fa fa-lg');
|
||||
if (response.Type === 'user')
|
||||
@@ -180,6 +181,7 @@ else
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Error: ' + errorThrown);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateNoSubjects() {
|
||||
|
||||
@@ -412,11 +412,11 @@ WriteLiteral("\',\r\n minLength: 2,\r\n
|
||||
");\r\n\r\n if ($this.is(\'[data-subjectstatus=\"new\"]\')) {\r\n " +
|
||||
" $this.remove();\r\n } else {\r\n $this.attr(\'data-subject" +
|
||||
"status\', \'removed\').hide();\r\n }\r\n\r\n updateNoSubjects();\r\n " +
|
||||
" }\r\n\r\n function add() {\r\n var id = textAdd.val();\r\n\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
" return false;\r\n }\r\n\r\n function add() {\r\n var" +
|
||||
" id = textAdd.val();\r\n\r\n $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 150 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
#line 151 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
Write(Url.Action(MVC.API.AuthorizationRole.Subject()));
|
||||
|
||||
|
||||
@@ -424,35 +424,35 @@ WriteLiteral("\',\r\n minLength: 2,\r\n
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n method: \'post\',\r\n data: { Id: id }\r\n " +
|
||||
" }).done(function (response) {\r\n if (response) {\r\n " +
|
||||
" if (list.find(\'li[data-subjectid=\"\' + response.Id + \'\"]\').length == 0) {\r\n" +
|
||||
"\r\n var liIcon = $(\'<i>\').addClass(\'fa fa-lg\');\r\n " +
|
||||
" if (response.Type === \'user\')\r\n liIcon" +
|
||||
".addClass(\'fa-user\');\r\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n var li = $(\'<li>\')\r\n " +
|
||||
" .append(liIcon)\r\n .append($(" +
|
||||
"\'<span>\').text(response.Id == response.Name ? response.Id : response.Name + \' [\'" +
|
||||
" + response.Id + \']\'))\r\n .append($(\'<i>\').addClass(\'f" +
|
||||
"a fa-times-circle remove\'))\r\n .addClass(response.Type" +
|
||||
")\r\n .attr(\'data-subjectid\', 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 already been adde" +
|
||||
"d\');\r\n }\r\n } else {\r\n alert" +
|
||||
"(\'Unknown Id\');\r\n }\r\n }).fail(function (jqXHR, textSta" +
|
||||
"tus, errorThrown) {\r\n alert(\'Error: \' + errorThrown);\r\n " +
|
||||
" });\r\n }\r\n\r\n function updateNoSubjects() {\r\n if (l" +
|
||||
"ist.find(\'li:visible\').length > 0)\r\n noSubjects.hide();\r\n " +
|
||||
" else\r\n noSubjects.show();\r\n }\r\n\r\n function save" +
|
||||
"Changes() {\r\n var form = $(\'#Config_AuthRoles_Subjects_Update_Dialog_" +
|
||||
"Form\').empty();\r\n\r\n list.find(\'li[data-subjectstatus!=\"removed\"]\').ea" +
|
||||
"ch(function () {\r\n var subjectId = $(this).attr(\'data-subjectid\')" +
|
||||
";\r\n\r\n form.append($(\'<input>\').attr({\r\n \'name\'" +
|
||||
": \'Subjects\',\r\n \'type\': \'hidden\'\r\n }).val(subj" +
|
||||
"ectId));\r\n\r\n }).get();\r\n\r\n form.submit();\r\n\r\n d" +
|
||||
"ialog.dialog(\"disable\");\r\n dialog.dialog(\"option\", \"buttons\", null);\r" +
|
||||
"\n }\r\n\r\n $(function () {\r\n $(\'#Config_AuthRoles_UpdateAd" +
|
||||
"ministrators\').click(showDialog);\r\n });\r\n\r\n })();\r\n</script>\r\n<!-- #en" +
|
||||
"dregion -->\r\n<div");
|
||||
" if (list.find(\'li[data-subjectid=\"\' + response.Id.replace(\'\\\\\', \'\\\\\\\\\') + " +
|
||||
"\'\"]\').length == 0) {\r\n\r\n var liIcon = $(\'<i>\').addClass(\'" +
|
||||
"fa fa-lg\');\r\n if (response.Type === \'user\')\r\n " +
|
||||
" liIcon.addClass(\'fa-user\');\r\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n v" +
|
||||
"ar li = $(\'<li>\')\r\n .append(liIcon)\r\n " +
|
||||
" .append($(\'<span>\').text(response.Id == response.Name ? response.Id " +
|
||||
": response.Name + \' [\' + response.Id + \']\'))\r\n .appen" +
|
||||
"d($(\'<i>\').addClass(\'fa fa-times-circle remove\'))\r\n ." +
|
||||
"addClass(response.Type)\r\n .attr(\'data-subjectid\', res" +
|
||||
"ponse.Id)\r\n .attr(\'data-subjectstatus\', \'new\');\r\n\r\n " +
|
||||
" list.append(li);\r\n\r\n updateNoSubjec" +
|
||||
"ts();\r\n } else {\r\n alert(\'That subject" +
|
||||
" has already been added\');\r\n }\r\n } else {\r\n " +
|
||||
" alert(\'Unknown Id\');\r\n }\r\n }).fail(fu" +
|
||||
"nction (jqXHR, textStatus, errorThrown) {\r\n alert(\'Error: \' + err" +
|
||||
"orThrown);\r\n });\r\n return false;\r\n }\r\n\r\n " +
|
||||
" function updateNoSubjects() {\r\n if (list.find(\'li:visible\').leng" +
|
||||
"th > 0)\r\n noSubjects.hide();\r\n else\r\n n" +
|
||||
"oSubjects.show();\r\n }\r\n\r\n function saveChanges() {\r\n va" +
|
||||
"r form = $(\'#Config_AuthRoles_Subjects_Update_Dialog_Form\').empty();\r\n\r\n " +
|
||||
" list.find(\'li[data-subjectstatus!=\"removed\"]\').each(function () {\r\n " +
|
||||
" var subjectId = $(this).attr(\'data-subjectid\');\r\n\r\n form.a" +
|
||||
"ppend($(\'<input>\').attr({\r\n \'name\': \'Subjects\',\r\n " +
|
||||
" \'type\': \'hidden\'\r\n }).val(subjectId));\r\n\r\n })." +
|
||||
"get();\r\n\r\n form.submit();\r\n\r\n dialog.dialog(\"disable\");\r\n " +
|
||||
" dialog.dialog(\"option\", \"buttons\", null);\r\n }\r\n\r\n $(fun" +
|
||||
"ction () {\r\n $(\'#Config_AuthRoles_UpdateAdministrators\').click(showDi" +
|
||||
"alog);\r\n });\r\n\r\n })();\r\n</script>\r\n<!-- #endregion -->\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
@@ -467,7 +467,7 @@ WriteLiteral(" class=\"button\"");
|
||||
WriteLiteral(">Update Disco Administrators [");
|
||||
|
||||
|
||||
#line 219 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
#line 221 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
Write(Model.AdministratorSubjects.Count);
|
||||
|
||||
|
||||
@@ -478,13 +478,13 @@ WriteLiteral("]</a>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 220 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
#line 222 "..\..\Areas\Config\Views\AuthorizationRole\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Authorization Role", MVC.Config.AuthorizationRole.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>");
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
|
||||
<li class="@(sg.IsGroup ? "group" : "user")">@if (sg.IsGroup)
|
||||
{
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@(Url.Action(MVC.User.Show(sg.Id)))#UserDetailTab-Authorization"><i class="fa fa-user fa-lg"></i>@displayName</a>
|
||||
<a href="@(Url.Action(MVC.User.Show(sg.Id)))#UserDetailTab-Authorization"><i class="fa fa-user fa-lg"></i>@displayName</a>
|
||||
}</li>
|
||||
}
|
||||
</ul>
|
||||
@@ -69,13 +69,13 @@
|
||||
{
|
||||
var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
|
||||
<li class="@(sg.IsGroup ? "group" : "user")" data-subjectid="@sg.Id">@if (sg.IsGroup)
|
||||
{
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-user fa-lg"></i>@displayName
|
||||
}<i class="fa fa-times-circle remove"></i></li>
|
||||
{
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-user fa-lg"></i>@displayName
|
||||
}<i class="fa fa-times-circle remove"></i></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -174,7 +174,7 @@
|
||||
data: { Id: id }
|
||||
}).done(function(response){
|
||||
if (response){
|
||||
if (list.find('li[data-subjectid="'+response.Id+'"]').length == 0){
|
||||
if (list.find('li[data-subjectid="'+response.Id.replace('\\', '\\\\')+'"]').length == 0){
|
||||
|
||||
var liIcon = $('<i>').addClass('fa fa-lg');
|
||||
if (response.Type === 'user')
|
||||
|
||||
@@ -211,7 +211,7 @@ WriteLiteral(">");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-users fa-lg\"");
|
||||
|
||||
@@ -225,7 +225,7 @@ WriteLiteral("></i>");
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
Write(displayName);
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -240,17 +240,17 @@ WriteLiteral("></i>");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 2766), Tuple.Create("\"", 2836)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 2676), Tuple.Create("\"", 2746)
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2773), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
|
||||
, Tuple.Create(Tuple.Create("", 2683), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2773), false)
|
||||
, Tuple.Create(Tuple.Create("", 2808), Tuple.Create("#UserDetailTab-Authorization", 2808), true)
|
||||
, 2683), false)
|
||||
, Tuple.Create(Tuple.Create("", 2718), Tuple.Create("#UserDetailTab-Authorization", 2718), true)
|
||||
);
|
||||
|
||||
WriteLiteral("><i");
|
||||
@@ -261,7 +261,7 @@ WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
Write(displayName);
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -343,14 +343,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3887), Tuple.Create("\"", 3927)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3797), Tuple.Create("\"", 3837)
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3895), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
, Tuple.Create(Tuple.Create("", 3805), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3895), false)
|
||||
, 3805), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-subjectid=\"");
|
||||
@@ -369,12 +369,12 @@ WriteLiteral(">");
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
if (sg.IsGroup)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-users fa-lg\"");
|
||||
|
||||
@@ -388,7 +388,7 @@ WriteLiteral("></i>");
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
Write(displayName);
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -396,14 +396,14 @@ WriteLiteral("></i>");
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-user fa-lg\"");
|
||||
|
||||
@@ -417,7 +417,7 @@ WriteLiteral("></i>");
|
||||
#line hidden
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
Write(displayName);
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -425,7 +425,7 @@ WriteLiteral("></i>");
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -465,14 +465,14 @@ WriteLiteral(">Add</a>\r\n </div>\r\n
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_Form\"");
|
||||
|
||||
WriteAttribute("action", Tuple.Create(" action=\"", 5172), Tuple.Create("\"", 5269)
|
||||
WriteAttribute("action", Tuple.Create(" action=\"", 5168), Tuple.Create("\"", 5265)
|
||||
|
||||
#line 86 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5181), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.AuthorizationRole.UpdateSubjects(Model.Token.Role.Id, null, true))
|
||||
, Tuple.Create(Tuple.Create("", 5177), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.AuthorizationRole.UpdateSubjects(Model.Token.Role.Id, null, true))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5181), false)
|
||||
, 5177), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" method=\"post\"");
|
||||
@@ -552,49 +552,49 @@ WriteLiteral("\',\r\n minLength: 2,\r
|
||||
WriteLiteral("\',\r\n method: \'post\',\r\n " +
|
||||
" data: { Id: id }\r\n }).done(function(r" +
|
||||
"esponse){\r\n if (response){\r\n " +
|
||||
" if (list.find(\'li[data-subjectid=\"\'+response.Id+\'\"]\').len" +
|
||||
"gth == 0){\r\n \r\n " +
|
||||
" var liIcon = $(\'<i>\').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 " +
|
||||
"= $(\'<li>\')\r\n .append(liIcon)\r\n " +
|
||||
" .append($(\'<span>\').text(response." +
|
||||
"Id == response.Name ? response.Id : response.Name + \' [\' + response.Id + \']\'))\r" +
|
||||
"\n .append($(\'<i>\').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($(\'<input>\').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 " +
|
||||
" </script>\r\n </div>\r\n </td>\r\n <" +
|
||||
"/tr>\r\n <tr>\r\n <td");
|
||||
" if (list.find(\'li[data-subjectid=\"\'+response.Id.replace(\'" +
|
||||
"\\\\\', \'\\\\\\\\\')+\'\"]\').length == 0){\r\n \r\n" +
|
||||
" var liIcon = $(\'<i>\').addClass(\'fa f" +
|
||||
"a-lg\');\r\n if (response.Type === \'user" +
|
||||
"\')\r\n liIcon.addClass(\'fa-user\');\r" +
|
||||
"\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n " +
|
||||
" var li = $(\'<li>\')\r\n " +
|
||||
" .append(liIcon)\r\n .append($(\'<" +
|
||||
"span>\').text(response.Id == response.Name ? response.Id : response.Name + \' [\' " +
|
||||
"+ response.Id + \']\'))\r\n .append($" +
|
||||
"(\'<i>\').addClass(\'fa fa-times-circle remove\'))\r\n " +
|
||||
" .addClass(response.Type)\r\n " +
|
||||
" .attr(\'data-subjectid\', 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 aler" +
|
||||
"t(\'That subject has already been added\');\r\n " +
|
||||
" }\r\n }else{\r\n " +
|
||||
" alert(\'Unknown Id\');\r\n }\r\n " +
|
||||
" }).fail(function(jqXHR, textStatus, errorThrown){\r\n " +
|
||||
" alert(\'Error: \' + errorThrown);\r\n " +
|
||||
" });\r\n }\r\n\r\n " +
|
||||
" function updateNoSubjects(){\r\n if (list.find" +
|
||||
"(\'li:visible\').length > 0)\r\n noSubjects.hide(" +
|
||||
");\r\n else\r\n no" +
|
||||
"Subjects.show();\r\n }\r\n\r\n f" +
|
||||
"unction saveChanges(){\r\n var form = $(\'#Config_Au" +
|
||||
"thRoles_Subjects_Update_Dialog_Form\').empty();\r\n\r\n " +
|
||||
" list.find(\'li[data-subjectstatus!=\"removed\"]\').each(function(){\r\n " +
|
||||
" var subjectId = $(this).attr(\'data-subjectid\');\r\n " +
|
||||
" \r\n form.append($(" +
|
||||
"\'<input>\').attr({\r\n \'name\': \'Subjects\',\r\n" +
|
||||
" \'type\': \'hidden\'\r\n " +
|
||||
" }).val(subjectId));\r\n\r\n }).get();\r\n" +
|
||||
"\r\n form.submit();\r\n\r\n " +
|
||||
" dialog.dialog(\"disable\");\r\n dialog.dialog(\"op" +
|
||||
"tion\", \"buttons\", null);\r\n }\r\n\r\n " +
|
||||
" $(function(){\r\n $(\'#Config_AuthRoles_Subje" +
|
||||
"cts_Update\').click(showDialog);\r\n });\r\n\r\n " +
|
||||
" })();\r\n </script>\r\n </div>\r\n " +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" colspan=\"2\"");
|
||||
|
||||
|
||||
@@ -54,6 +54,56 @@ div.form > table {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
/* Administrators */
|
||||
#initialConfig_Administrators table {
|
||||
margin-top: 15px;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects li,
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_List li {
|
||||
padding: 4px 0 4px 4px;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects li i.fa-user,
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_List li i.fa-user,
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects li i.fa-users,
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_List li i.fa-users {
|
||||
min-width: 22px;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_ListContainer {
|
||||
height: 280px;
|
||||
overflow-y: auto;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #d8d8d8;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_None {
|
||||
padding-top: 15px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_AddContainer {
|
||||
padding-top: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_List li {
|
||||
cursor: pointer;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_List li:hover {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_List li:hover .remove {
|
||||
opacity: .8;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_List li .remove {
|
||||
margin-top: 2px;
|
||||
padding-right: 6px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
color: #e51400;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
#initialConfig_Administrators #Config_AuthRoles_Subjects_Update_Dialog_List li .remove:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
/* Complete */
|
||||
#initialConfig_Complete span.icon {
|
||||
margin-right: 4px;
|
||||
|
||||
@@ -7,17 +7,14 @@ header, #header {
|
||||
}
|
||||
}
|
||||
|
||||
#dialogWait
|
||||
{
|
||||
#dialogWait {
|
||||
padding-top: 30px;
|
||||
|
||||
.ajaxLoading
|
||||
{
|
||||
.ajaxLoading {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
div
|
||||
{
|
||||
div {
|
||||
padding-left: 31px;
|
||||
}
|
||||
}
|
||||
@@ -33,27 +30,22 @@ header, #header {
|
||||
}
|
||||
}
|
||||
|
||||
div.actionBar
|
||||
{
|
||||
div.actionBar {
|
||||
margin-top: 70px !important;
|
||||
background-color: rgba(240, 240, 240, 0.2);
|
||||
}
|
||||
|
||||
div.form > table
|
||||
{
|
||||
div.form > table {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* Welcome */
|
||||
#initialConfig_Welcome
|
||||
{
|
||||
#initialConfig_Welcome {
|
||||
div.form {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
#OrganisationName
|
||||
{
|
||||
#OrganisationName {
|
||||
font-size: 1.2em;
|
||||
padding: 6px;
|
||||
margin-top: 10px;
|
||||
@@ -63,26 +55,21 @@ div.form > table
|
||||
}
|
||||
|
||||
/* FileStore */
|
||||
#initialConfig_FileStore
|
||||
{
|
||||
#treeFilesystem .dynatree-container
|
||||
{
|
||||
#initialConfig_FileStore {
|
||||
#treeFilesystem .dynatree-container {
|
||||
height: 280px;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#treeFilesystemActions
|
||||
{
|
||||
#treeFilesystemActions {
|
||||
margin: 10px 0 2px 0;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
#dialogCreateDirectory
|
||||
{
|
||||
#createDirectoryName
|
||||
{
|
||||
#dialogCreateDirectory {
|
||||
#createDirectoryName {
|
||||
font-size: 1.2em;
|
||||
padding: 6px;
|
||||
margin-top: 10px;
|
||||
@@ -90,21 +77,81 @@ div.form > table
|
||||
}
|
||||
}
|
||||
|
||||
/* Administrators */
|
||||
#initialConfig_Administrators {
|
||||
|
||||
table {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
#Config_AuthRoles_Subjects, #Config_AuthRoles_Subjects_Update_Dialog_List {
|
||||
li {
|
||||
padding: 4px 0 4px 4px;
|
||||
|
||||
i.fa-user, i.fa-users {
|
||||
min-width: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Config_AuthRoles_Subjects_Update_Dialog_ListContainer {
|
||||
height: 280px;
|
||||
overflow-y: auto;
|
||||
background-color: @white;
|
||||
border: 1px solid @TableDataDarkBorderColour;
|
||||
}
|
||||
|
||||
#Config_AuthRoles_Subjects_Update_Dialog_None {
|
||||
padding-top: 15px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#Config_AuthRoles_Subjects_Update_Dialog_AddContainer {
|
||||
padding-top: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#Config_AuthRoles_Subjects_Update_Dialog_List {
|
||||
li {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: @TableDataBorderColour;
|
||||
|
||||
.remove {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
|
||||
.remove {
|
||||
margin-top: 2px;
|
||||
padding-right: 6px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
color: @StatusRemove;
|
||||
font-size: 1.3em;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Complete */
|
||||
#initialConfig_Complete
|
||||
{
|
||||
span.icon
|
||||
{
|
||||
#initialConfig_Complete {
|
||||
span.icon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.testResult
|
||||
{
|
||||
.testResult {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.exception
|
||||
{
|
||||
.exception {
|
||||
border: 1px dashed #FF9696;
|
||||
background-color: #FFD8D8;
|
||||
margin-top: 10px;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -10,6 +10,10 @@ using System.Text.RegularExpressions;
|
||||
using System.IO.Compression;
|
||||
using System.Management;
|
||||
using System.Web;
|
||||
using Disco.Services.Users;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Models.Interop.ActiveDirectory;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
namespace Disco.Web.Controllers
|
||||
{
|
||||
@@ -228,9 +232,12 @@ namespace Disco.Web.Controllers
|
||||
ModelState.AddModelError(string.Empty, string.Format("Unable to extract File Store template: [{0}] {1}", ex.GetType().Name, ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize Core Environment
|
||||
AppConfig.InitalizeCoreEnvironment(database);
|
||||
}
|
||||
|
||||
return RedirectToAction(MVC.InitialConfig.Complete());
|
||||
return RedirectToAction(MVC.InitialConfig.Administrators());
|
||||
}
|
||||
|
||||
m.ExpandDirectoryModel();
|
||||
@@ -245,6 +252,81 @@ namespace Disco.Web.Controllers
|
||||
|
||||
#region Administrators
|
||||
|
||||
public virtual ActionResult Administrators()
|
||||
{
|
||||
var administratorSubjects = UserService.AdministratorSubjectIds
|
||||
.Select(subjectId => ActiveDirectory.RetrieveObject(subjectId))
|
||||
.Where(item => item != null)
|
||||
.Select(item => Disco.Web.Areas.Config.Models.AuthorizationRole.SubjectDescriptorModel.FromActiveDirectoryObject(item))
|
||||
.OrderBy(item => item.Name).ToList();
|
||||
|
||||
var m = new AdministratorsModel()
|
||||
{
|
||||
AdministratorSubjects = administratorSubjects
|
||||
};
|
||||
|
||||
return View(m);
|
||||
}
|
||||
public virtual ActionResult AdministratorsSearch(string term)
|
||||
{
|
||||
var groupResults = ActiveDirectory.SearchGroups(term).Cast<IActiveDirectoryObject>();
|
||||
var userResults = ActiveDirectory.SearchUserAccounts(term).Cast<IActiveDirectoryObject>();
|
||||
|
||||
var results = groupResults.Concat(userResults).OrderBy(r => r.SamAccountName)
|
||||
.Select(r => Disco.Web.Areas.API.Models.AuthorizationRole.SubjectItem.FromActiveDirectoryObject(r)).ToList();
|
||||
|
||||
return Json(results, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
public virtual ActionResult AdministratorsSubject(string Id)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Id))
|
||||
return Json(null, JsonRequestBehavior.AllowGet);
|
||||
else if (!Id.Contains(@"\"))
|
||||
Id = string.Format(@"{0}\{1}", ActiveDirectory.PrimaryDomain.NetBiosName, Id);
|
||||
|
||||
var subject = ActiveDirectory.RetrieveObject(Id);
|
||||
|
||||
if (subject == null || !(subject is ActiveDirectoryUserAccount || subject is ActiveDirectoryGroup))
|
||||
return Json(null, JsonRequestBehavior.AllowGet);
|
||||
else
|
||||
return Json(Disco.Web.Areas.API.Models.AuthorizationRole.SubjectItem.FromActiveDirectoryObject(subject), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
[HttpPost]
|
||||
public virtual ActionResult Administrators(string[] Subjects)
|
||||
{
|
||||
string[] proposedSubjects;
|
||||
string[] removedSubjects = null;
|
||||
string[] addedSubjects = null;
|
||||
|
||||
// Validate Subjects
|
||||
if (Subjects != null || Subjects.Length > 0)
|
||||
{
|
||||
|
||||
var subjects = Subjects.Where(s => !string.IsNullOrWhiteSpace(s)).Select(s => s.Trim()).Select(s => new Tuple<string, IActiveDirectoryObject>(s, ActiveDirectory.RetrieveObject(s))).ToList();
|
||||
var invalidSubjects = subjects.Where(s => s.Item2 == null).ToList();
|
||||
|
||||
if (invalidSubjects.Count > 0)
|
||||
throw new ArgumentException(string.Format("Subjects not found: {0}", string.Join(", ", invalidSubjects)), "Subjects");
|
||||
|
||||
proposedSubjects = subjects.Select(s => s.Item2.NetBiosId).OrderBy(s => s).ToArray();
|
||||
var currentSubjects = UserService.AdministratorSubjectIds;
|
||||
removedSubjects = currentSubjects.Except(proposedSubjects).ToArray();
|
||||
addedSubjects = proposedSubjects.Except(currentSubjects).ToArray();
|
||||
|
||||
using (DiscoDataContext database = new DiscoDataContext())
|
||||
{
|
||||
UserService.UpdateAdministratorSubjectIds(database, proposedSubjects);
|
||||
}
|
||||
|
||||
if (removedSubjects != null && removedSubjects.Length > 0)
|
||||
AuthorizationLog.LogAdministratorSubjectsRemoved("<Initial Configuration>", removedSubjects);
|
||||
if (addedSubjects != null && addedSubjects.Length > 0)
|
||||
AuthorizationLog.LogAdministratorSubjectsAdded("<Initial Configuration>", addedSubjects);
|
||||
}
|
||||
|
||||
return RedirectToAction(MVC.InitialConfig.Complete());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Complete
|
||||
|
||||
@@ -546,6 +546,12 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\T4MVCExtensions.cs" />
|
||||
<Compile Include="Models\InitialConfig\AdministratorsModel.cs" />
|
||||
<Compile Include="Views\InitialConfig\Administrators.generated.cs">
|
||||
<DependentUpon>Administrators.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Views\Job\JobParts\Queues.generated.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -1563,6 +1569,10 @@
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>_ViewStart.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<Content Include="Views\InitialConfig\Administrators.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Administrators.generated.cs</LastGenOutput>
|
||||
</Content>
|
||||
<None Include="Views\InitialConfig\_ViewStart.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>_ViewStart.generated.cs</LastGenOutput>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using Disco.Web.Areas.Config.Models.AuthorizationRole;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Models.InitialConfig
|
||||
{
|
||||
public class AdministratorsModel
|
||||
{
|
||||
public List<SubjectDescriptorModel> AdministratorSubjects { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1099,6 +1099,18 @@ namespace Disco.Web.Controllers
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.FileStoreBranch);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult AdministratorsSearch()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.AdministratorsSearch);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult AdministratorsSubject()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.AdministratorsSubject);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public InitialConfigController Actions { get { return MVC.InitialConfig; } }
|
||||
@@ -1120,6 +1132,9 @@ namespace Disco.Web.Controllers
|
||||
public readonly string Database = "Database";
|
||||
public readonly string FileStore = "FileStore";
|
||||
public readonly string FileStoreBranch = "FileStoreBranch";
|
||||
public readonly string Administrators = "Administrators";
|
||||
public readonly string AdministratorsSearch = "AdministratorsSearch";
|
||||
public readonly string AdministratorsSubject = "AdministratorsSubject";
|
||||
public readonly string Complete = "Complete";
|
||||
public readonly string RestartWebApp = "RestartWebApp";
|
||||
}
|
||||
@@ -1132,6 +1147,9 @@ namespace Disco.Web.Controllers
|
||||
public const string Database = "Database";
|
||||
public const string FileStore = "FileStore";
|
||||
public const string FileStoreBranch = "FileStoreBranch";
|
||||
public const string Administrators = "Administrators";
|
||||
public const string AdministratorsSearch = "AdministratorsSearch";
|
||||
public const string AdministratorsSubject = "AdministratorsSubject";
|
||||
public const string Complete = "Complete";
|
||||
public const string RestartWebApp = "RestartWebApp";
|
||||
}
|
||||
@@ -1169,6 +1187,30 @@ namespace Disco.Web.Controllers
|
||||
{
|
||||
public readonly string Path = "Path";
|
||||
}
|
||||
static readonly ActionParamsClass_AdministratorsSearch s_params_AdministratorsSearch = new ActionParamsClass_AdministratorsSearch();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_AdministratorsSearch AdministratorsSearchParams { get { return s_params_AdministratorsSearch; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_AdministratorsSearch
|
||||
{
|
||||
public readonly string term = "term";
|
||||
}
|
||||
static readonly ActionParamsClass_AdministratorsSubject s_params_AdministratorsSubject = new ActionParamsClass_AdministratorsSubject();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_AdministratorsSubject AdministratorsSubjectParams { get { return s_params_AdministratorsSubject; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_AdministratorsSubject
|
||||
{
|
||||
public readonly string Id = "Id";
|
||||
}
|
||||
static readonly ActionParamsClass_Administrators s_params_Administrators = new ActionParamsClass_Administrators();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_Administrators AdministratorsParams { get { return s_params_Administrators; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_Administrators
|
||||
{
|
||||
public readonly string Subjects = "Subjects";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ViewsClass Views { get { return s_views; } }
|
||||
@@ -1180,6 +1222,7 @@ namespace Disco.Web.Controllers
|
||||
public class _ViewNamesClass
|
||||
{
|
||||
public readonly string _ViewStart = "_ViewStart";
|
||||
public readonly string Administrators = "Administrators";
|
||||
public readonly string Complete = "Complete";
|
||||
public readonly string Database = "Database";
|
||||
public readonly string FileStore = "FileStore";
|
||||
@@ -1187,6 +1230,7 @@ namespace Disco.Web.Controllers
|
||||
public readonly string Welcome = "Welcome";
|
||||
}
|
||||
public readonly string _ViewStart = "~/Views/InitialConfig/_ViewStart.cshtml";
|
||||
public readonly string Administrators = "~/Views/InitialConfig/Administrators.cshtml";
|
||||
public readonly string Complete = "~/Views/InitialConfig/Complete.cshtml";
|
||||
public readonly string Database = "~/Views/InitialConfig/Database.cshtml";
|
||||
public readonly string FileStore = "~/Views/InitialConfig/FileStore.cshtml";
|
||||
@@ -1276,6 +1320,45 @@ namespace Disco.Web.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
partial void AdministratorsOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||
|
||||
public override System.Web.Mvc.ActionResult Administrators()
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Administrators);
|
||||
AdministratorsOverride(callInfo);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
partial void AdministratorsSearchOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string term);
|
||||
|
||||
public override System.Web.Mvc.ActionResult AdministratorsSearch(string term)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.AdministratorsSearch);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "term", term);
|
||||
AdministratorsSearchOverride(callInfo, term);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
partial void AdministratorsSubjectOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string Id);
|
||||
|
||||
public override System.Web.Mvc.ActionResult AdministratorsSubject(string Id)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.AdministratorsSubject);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Id", Id);
|
||||
AdministratorsSubjectOverride(callInfo, Id);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
partial void AdministratorsOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string[] Subjects);
|
||||
|
||||
public override System.Web.Mvc.ActionResult Administrators(string[] Subjects)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Administrators);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Subjects", Subjects);
|
||||
AdministratorsOverride(callInfo, Subjects);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
partial void CompleteOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||
|
||||
public override System.Web.Mvc.ActionResult Complete()
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
@model Disco.Web.Models.InitialConfig.AdministratorsModel
|
||||
@{
|
||||
ViewBag.Title = null;
|
||||
}
|
||||
<h1>@CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "Disco Administrators"))</h1>
|
||||
<div id="initialConfig_Administrators">
|
||||
<div class="form" style="width: 450px">
|
||||
<div>
|
||||
Disco Administrators have access to the entire Disco application.
|
||||
<code>Domain Admins</code> is a required member and is always included regardless of configuration.
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="Config_AuthRoles_Subjects_Update_Dialog_ListContainer">
|
||||
<span id="Config_AuthRoles_Subjects_Update_Dialog_None" class="smallMessage">None Associated</span>
|
||||
<ul id="Config_AuthRoles_Subjects_Update_Dialog_List" class="none">
|
||||
@foreach (var sg in Model.AdministratorSubjects)
|
||||
{
|
||||
var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);
|
||||
<li class="@(sg.IsGroup ? "group" : "user")" data-subjectid="@sg.Id">@if (sg.IsGroup)
|
||||
{
|
||||
<i class="fa fa-users fa-lg"></i>@displayName
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-user fa-lg"></i>@displayName
|
||||
}<i class="fa fa-times-circle remove"></i></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div id="Config_AuthRoles_Subjects_Update_Dialog_AddContainer">
|
||||
<input type="text" id="Config_AuthRoles_Subjects_Update_Dialog_TextAdd" />
|
||||
<a id="Config_AuthRoles_Subjects_Update_Dialog_Add" href="#" class="button small">Add</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogWait" title="Please Wait" class="dialog">
|
||||
<h2><span class="ajaxLoading"></span>Validating Configuration</h2>
|
||||
<div>Please wait while the Disco configuration is validated</div>
|
||||
</div>
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<div class="actionBar">
|
||||
<input id="submitForm" type="submit" class="button" value="Continue" />
|
||||
</div>
|
||||
}
|
||||
<script>
|
||||
(function () {
|
||||
var container, textAdd, list, noSubjects;
|
||||
|
||||
function remove() {
|
||||
$this = $(this).closest('li');
|
||||
|
||||
if ($this.is('[data-subjectstatus="new"]')) {
|
||||
$this.remove();
|
||||
} else {
|
||||
$this.attr('data-subjectstatus', 'removed').hide();
|
||||
}
|
||||
|
||||
updateNoSubjects();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function add() {
|
||||
var id = textAdd.val();
|
||||
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.InitialConfig.AdministratorsSubject())',
|
||||
method: 'post',
|
||||
data: { Id: id }
|
||||
}).done(function (response) {
|
||||
if (response) {
|
||||
if (list.find('li[data-subjectid="' + response.Id.replace('\\', '\\\\') + '"]').length == 0) {
|
||||
|
||||
var liIcon = $('<i>').addClass('fa fa-lg');
|
||||
if (response.Type === 'user')
|
||||
liIcon.addClass('fa-user');
|
||||
else
|
||||
liIcon.addClass('fa-users');
|
||||
|
||||
var li = $('<li>')
|
||||
.append(liIcon)
|
||||
.append($('<span>').text(response.Id == response.Name ? response.Id : response.Name + ' [' + response.Id + ']'))
|
||||
.append($('<i>').addClass('fa fa-times-circle remove'))
|
||||
.addClass(response.Type)
|
||||
.attr('data-subjectid', response.Id)
|
||||
.attr('data-subjectstatus', 'new');
|
||||
|
||||
list.append(li);
|
||||
|
||||
updateNoSubjects();
|
||||
} else {
|
||||
alert('That subject has already been added');
|
||||
}
|
||||
} else {
|
||||
alert('Unknown Id');
|
||||
}
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to retrieve that subject, please check the account/group and try again');
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateNoSubjects() {
|
||||
if (list.find('li:visible').length > 0)
|
||||
noSubjects.hide();
|
||||
else
|
||||
noSubjects.show();
|
||||
}
|
||||
|
||||
// Initialize Page
|
||||
|
||||
container = $('#initialConfig_Administrators');
|
||||
|
||||
container.on('click', '.remove', remove);
|
||||
|
||||
list = $('#Config_AuthRoles_Subjects_Update_Dialog_List');
|
||||
noSubjects = $('#Config_AuthRoles_Subjects_Update_Dialog_None');
|
||||
|
||||
textAdd = $('#Config_AuthRoles_Subjects_Update_Dialog_TextAdd');
|
||||
|
||||
textAdd.watermark('Search Subjects')
|
||||
.autocomplete({
|
||||
source: '@(Url.Action(MVC.InitialConfig.AdministratorsSearch()))',
|
||||
minLength: 2,
|
||||
focus: function (e, ui) {
|
||||
textAdd.val(ui.item.Id);
|
||||
return false;
|
||||
},
|
||||
select: function (e, ui) {
|
||||
textAdd.val(ui.item.Id).blur();
|
||||
return false;
|
||||
}
|
||||
}).data('ui-autocomplete')._renderItem = function (ul, item) {
|
||||
return $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append("<a><strong>" + item.Name + "</strong><br>" + item.Id + " (" + item.Type + ")</a>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
|
||||
$('#Config_AuthRoles_Subjects_Update_Dialog_Add').click(add);
|
||||
updateNoSubjects();
|
||||
|
||||
$('#submitForm').closest('form').submit(function () {
|
||||
|
||||
var form = $(this);
|
||||
|
||||
list.find('li[data-subjectstatus!="removed"]').each(function () {
|
||||
var subjectId = $(this).attr('data-subjectid');
|
||||
|
||||
form.append($('<input>').attr({
|
||||
'name': 'Subjects',
|
||||
'type': 'hidden'
|
||||
}).val(subjectId));
|
||||
|
||||
});
|
||||
|
||||
$('#dialogWait').dialog({
|
||||
autoOpen: true,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 150,
|
||||
closeOnEscape: false
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
});
|
||||
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,373 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.InitialConfig
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/Administrators.cshtml")]
|
||||
public partial class Administrators : Disco.Services.Web.WebViewPage<Disco.Web.Models.InitialConfig.AdministratorsModel>
|
||||
{
|
||||
public Administrators()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
|
||||
ViewBag.Title = null;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h1>");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "Disco Administrators")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h1>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"initialConfig_Administrators\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<div>
|
||||
Disco Administrators have access to the entire Disco application.
|
||||
<code>Domain Admins</code> is a required member and is always included regardless of configuration.
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_ListContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_None\"");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">None Associated</span>\r\n <ul");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_List\"");
|
||||
|
||||
WriteLiteral(" class=\"none\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\InitialConfig\Administrators.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(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1161), Tuple.Create("\"", 1201)
|
||||
|
||||
#line 21 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1169), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1169), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-subjectid=\"");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
Write(sg.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
if (sg.IsGroup)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-users fa-lg\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-user fa-lg\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
Write(displayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-times-circle remove\"");
|
||||
|
||||
WriteLiteral("></i></li>\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </div>\r\n <d" +
|
||||
"iv");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_AddContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_TextAdd\"");
|
||||
|
||||
WriteLiteral(" />\r\n <a");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Subjects_Update_Dialog_Add\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Add</a>\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
||||
" </table>\r\n </div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogWait\"");
|
||||
|
||||
WriteLiteral(" title=\"Please Wait\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2><span");
|
||||
|
||||
WriteLiteral(" class=\"ajaxLoading\"");
|
||||
|
||||
WriteLiteral("></span>Validating Configuration</h2>\r\n <div>Please wait while the Disco confi" +
|
||||
"guration is validated</div>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"submitForm\"");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Continue\"");
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"<script>
|
||||
(function () {
|
||||
var container, textAdd, list, noSubjects;
|
||||
|
||||
function remove() {
|
||||
$this = $(this).closest('li');
|
||||
|
||||
if ($this.is('[data-subjectstatus=""new""]')) {
|
||||
$this.remove();
|
||||
} else {
|
||||
$this.attr('data-subjectstatus', 'removed').hide();
|
||||
}
|
||||
|
||||
updateNoSubjects();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function add() {
|
||||
var id = textAdd.val();
|
||||
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
Write(Url.Action(MVC.InitialConfig.AdministratorsSubject()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n method: \'post\',\r\n data: { Id: id }\r\n " +
|
||||
" }).done(function (response) {\r\n if (response) {\r\n " +
|
||||
" if (list.find(\'li[data-subjectid=\"\' + response.Id.replace(\'\\\\\', \'\\\\\\\\\') + " +
|
||||
"\'\"]\').length == 0) {\r\n\r\n var liIcon = $(\'<i>\').addClass(\'" +
|
||||
"fa fa-lg\');\r\n if (response.Type === \'user\')\r\n " +
|
||||
" liIcon.addClass(\'fa-user\');\r\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n v" +
|
||||
"ar li = $(\'<li>\')\r\n .append(liIcon)\r\n " +
|
||||
" .append($(\'<span>\').text(response.Id == response.Name ? response.Id " +
|
||||
": response.Name + \' [\' + response.Id + \']\'))\r\n .appen" +
|
||||
"d($(\'<i>\').addClass(\'fa fa-times-circle remove\'))\r\n ." +
|
||||
"addClass(response.Type)\r\n .attr(\'data-subjectid\', res" +
|
||||
"ponse.Id)\r\n .attr(\'data-subjectstatus\', \'new\');\r\n\r\n " +
|
||||
" list.append(li);\r\n\r\n updateNoSubjec" +
|
||||
"ts();\r\n } else {\r\n alert(\'That subject" +
|
||||
" has already been added\');\r\n }\r\n } else {\r\n " +
|
||||
" alert(\'Unknown Id\');\r\n }\r\n }).fail(fu" +
|
||||
"nction (jqXHR, textStatus, errorThrown) {\r\n alert(\'Unable to retr" +
|
||||
"ieve that subject, please check the account/group and try again\');\r\n " +
|
||||
"});\r\n\r\n return false;\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 // Initialize Page\r\n\r\n container = $(\'#initialConfig_Ad" +
|
||||
"ministrators\');\r\n\r\n container.on(\'click\', \'.remove\', remove);\r\n\r\n " +
|
||||
"list = $(\'#Config_AuthRoles_Subjects_Update_Dialog_List\');\r\n noSubjects =" +
|
||||
" $(\'#Config_AuthRoles_Subjects_Update_Dialog_None\');\r\n\r\n textAdd = $(\'#Co" +
|
||||
"nfig_AuthRoles_Subjects_Update_Dialog_TextAdd\');\r\n\r\n textAdd.watermark(\'S" +
|
||||
"earch Subjects\')\r\n .autocomplete({\r\n source: \'");
|
||||
|
||||
|
||||
#line 130 "..\..\Views\InitialConfig\Administrators.cshtml"
|
||||
Write(Url.Action(MVC.InitialConfig.AdministratorsSearch()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n minLength: 2,\r\n focus: function (e, ui) {\r\n " +
|
||||
" textAdd.val(ui.item.Id);\r\n return false;\r\n " +
|
||||
" },\r\n select: function (e, ui) {\r\n " +
|
||||
" textAdd.val(ui.item.Id).blur();\r\n return false;\r\n " +
|
||||
" }\r\n }).data(\'ui-autocomplete\')._renderItem = function (ul, item" +
|
||||
") {\r\n return $(\"<li></li>\")\r\n .data(\"item.auto" +
|
||||
"complete\", item)\r\n .append(\"<a><strong>\" + item.Name + \"</str" +
|
||||
"ong><br>\" + item.Id + \" (\" + item.Type + \")</a>\")\r\n .appendTo" +
|
||||
"(ul);\r\n };\r\n\r\n $(\'#Config_AuthRoles_Subjects_Update_Dialog_Add" +
|
||||
"\').click(add);\r\n updateNoSubjects();\r\n\r\n $(\'#submitForm\').closest(" +
|
||||
"\'form\').submit(function () {\r\n\r\n var form = $(this);\r\n\r\n l" +
|
||||
"ist.find(\'li[data-subjectstatus!=\"removed\"]\').each(function () {\r\n " +
|
||||
" var subjectId = $(this).attr(\'data-subjectid\');\r\n\r\n form.append" +
|
||||
"($(\'<input>\').attr({\r\n \'name\': \'Subjects\',\r\n " +
|
||||
" \'type\': \'hidden\'\r\n }).val(subjectId));\r\n\r\n });\r\n\r\n " +
|
||||
" $(\'#dialogWait\').dialog({\r\n autoOpen: true,\r\n " +
|
||||
" draggable: false,\r\n modal: true,\r\n resizabl" +
|
||||
"e: false,\r\n width: 400,\r\n height: 150,\r\n " +
|
||||
" closeOnEscape: false\r\n }).closest(\'.ui-dialog\').find(\'.ui-dialo" +
|
||||
"g-titlebar-close\').hide();\r\n });\r\n\r\n })();\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
|
||||
var refresh = function () {
|
||||
window.location.href = '/';
|
||||
window.location.href = '/Config';
|
||||
}
|
||||
window.setTimeout(refresh, 2000);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
@@ -97,7 +97,7 @@ WriteLiteral(@">Please wait while the Disco environment is initialized</div>
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
|
||||
var refresh = function () {
|
||||
window.location.href = '/';
|
||||
window.location.href = '/Config';
|
||||
}
|
||||
window.setTimeout(refresh, 2000);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@{
|
||||
ViewContext.ViewBag.IsInitialConfig = true;
|
||||
ViewContext.ViewData.Add("IsInitialConfig", true);
|
||||
Layout = MVC.Shared.Views._PublicLayout;
|
||||
Html.BundleDeferred("~/Style/InitialConfig");
|
||||
}
|
||||
@@ -47,7 +47,7 @@ namespace Disco.Web.Views.InitialConfig
|
||||
|
||||
#line 1 "..\..\Views\InitialConfig\_ViewStart.cshtml"
|
||||
|
||||
ViewContext.ViewBag.IsInitialConfig = true;
|
||||
ViewContext.ViewData.Add("IsInitialConfig", true);
|
||||
Layout = MVC.Shared.Views._PublicLayout;
|
||||
Html.BundleDeferred("~/Style/InitialConfig");
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Disco@{if(ViewBag.Title != null){<text> - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</text>}}</title>
|
||||
<title>Disco@{if (ViewBag.Title != null)
|
||||
{<text> - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</text>}}</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=20131224c" />
|
||||
<meta name="application-name" content="Disco" />
|
||||
<meta name="msapplication-starturl" content="/" />
|
||||
@@ -19,21 +20,24 @@
|
||||
<div id="heading">
|
||||
<a href="@Url.Action(MVC.Job.Index())"><i title="Disco - ICT Management"></i></a>
|
||||
</div>
|
||||
@if (ViewBag.IsInitialConfig != null){<text>
|
||||
<nav>
|
||||
<ul id="menu">
|
||||
<li class="active">@Html.ActionLink("Reports", MVC.Public.Public.Index())</li>
|
||||
<li>@Html.ActionLink("Administration", MVC.Job.Index(), accesskey: "1")</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</text>}
|
||||
@if (!ViewContext.ViewData.ContainsKey("IsInitialConfig"))
|
||||
{<text>
|
||||
<nav>
|
||||
<ul id="menu">
|
||||
<li class="active">@Html.ActionLink("Reports", MVC.Public.Public.Index())</li>
|
||||
<li>@Html.ActionLink("Administration", MVC.Job.Index(), accesskey: "1")</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</text>}
|
||||
</header>
|
||||
@if(ViewBag.Title != null){<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title)</div>}
|
||||
@if (ViewBag.Title != null)
|
||||
{<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title)</div>}
|
||||
<section id="layout_Page">
|
||||
@RenderBody()
|
||||
</section>
|
||||
<footer>
|
||||
Disco v@(Disco.Web.DiscoApplication.Version) @if (ViewBag.IsInitialConfig != null){<text>@@ @(Disco.Web.DiscoApplication.OrganisationName) | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence())</text>}
|
||||
Disco v@(Disco.Web.DiscoApplication.Version) @if (ViewBag.IsInitialConfig != null)
|
||||
{<text>@@ @(Disco.Web.DiscoApplication.OrganisationName) | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence())</text>}
|
||||
</footer>
|
||||
</div>
|
||||
@{ Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this); }
|
||||
|
||||
@@ -57,22 +57,23 @@ WriteLiteral("\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <title>Disco");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
if(ViewBag.Title != null){
|
||||
if (ViewBag.Title != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" - ");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title));
|
||||
#line 9 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
}
|
||||
#line 9 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -107,7 +108,7 @@ WriteLiteral(" />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
#line 14 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.BundleRenderDeferred());
|
||||
|
||||
|
||||
@@ -118,7 +119,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
#line 15 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(RenderSection("head", false));
|
||||
|
||||
|
||||
@@ -138,14 +139,14 @@ WriteLiteral(" id=\"heading\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 703), Tuple.Create("\"", 738)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 724), Tuple.Create("\"", 759)
|
||||
|
||||
#line 20 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 710), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index())
|
||||
#line 21 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 731), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 710), false)
|
||||
, 731), false)
|
||||
);
|
||||
|
||||
WriteLiteral("><i");
|
||||
@@ -155,48 +156,49 @@ WriteLiteral(" title=\"Disco - ICT Management\"");
|
||||
WriteLiteral("></i></a>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
#line 23 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 22 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
if (ViewBag.IsInitialConfig != null){
|
||||
#line 23 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
if (!ViewContext.ViewData.ContainsKey("IsInitialConfig"))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <nav>\r\n <ul");
|
||||
WriteLiteral("\r\n <nav>\r\n <ul");
|
||||
|
||||
WriteLiteral(" id=\"menu\"");
|
||||
|
||||
WriteLiteral(">\r\n <li");
|
||||
WriteLiteral(">\r\n <li");
|
||||
|
||||
WriteLiteral(" class=\"active\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.ActionLink("Reports", MVC.Public.Public.Index()));
|
||||
#line 27 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.ActionLink("Reports", MVC.Public.Public.Index()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.ActionLink("Administration", MVC.Job.Index(), accesskey: "1"));
|
||||
#line 28 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.ActionLink("Administration", MVC.Job.Index(), accesskey: "1"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n </ul>\r\n </nav>\r\n ");
|
||||
WriteLiteral("</li>\r\n </ul>\r\n </nav>\r\n ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
}
|
||||
#line 31 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -204,14 +206,15 @@ WriteLiteral("</li>\r\n </ul>\r\n </nav>\r\n
|
||||
WriteLiteral(" </header>\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
#line 33 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
if(ViewBag.Title != null){
|
||||
#line 33 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
if (ViewBag.Title != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -222,8 +225,8 @@ WriteLiteral(" id=\"layout_PageHeading\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(ViewBag.Title));
|
||||
#line 34 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(ViewBag.Title));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -231,8 +234,8 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
}
|
||||
#line 34 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -246,7 +249,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
#line 36 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(RenderBody());
|
||||
|
||||
|
||||
@@ -255,7 +258,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
#line 39 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
|
||||
|
||||
@@ -264,16 +267,17 @@ WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v"
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
if (ViewBag.IsInitialConfig != null){
|
||||
#line 39 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
if (ViewBag.IsInitialConfig != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("@ ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.OrganisationName);
|
||||
#line 40 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.OrganisationName);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -281,8 +285,8 @@ WriteLiteral("@ ");
|
||||
WriteLiteral(" | ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.ActionLink("Credits", MVC.Public.Public.Credits()));
|
||||
#line 40 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.ActionLink("Credits", MVC.Public.Public.Credits()));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -290,15 +294,15 @@ WriteLiteral(" | ");
|
||||
WriteLiteral(" | ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.ActionLink("Licence", MVC.Public.Public.Licence()));
|
||||
#line 40 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Html.ActionLink("Licence", MVC.Public.Public.Licence()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
}
|
||||
#line 40 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -306,13 +310,13 @@ WriteLiteral(" | ");
|
||||
WriteLiteral(" </footer>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
#line 43 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
#line 43 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
|
||||
|
||||
#line default
|
||||
|
||||
Reference in New Issue
Block a user