Update: Authorize User Roles with Attribute
Avoid overriding the Context.User in the http pipeline.
This commit is contained in:
@@ -46,14 +46,17 @@
|
|||||||
<Reference Include="itextsharp">
|
<Reference Include="itextsharp">
|
||||||
<HintPath>..\Resources\Libraries\iTextSharp\itextsharp.dll</HintPath>
|
<HintPath>..\Resources\Libraries\iTextSharp\itextsharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.SignalR.Core">
|
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.1.0.1\lib\net40\Microsoft.AspNet.SignalR.Core.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.1.1.0\lib\net40\Microsoft.AspNet.SignalR.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.SignalR.Owin">
|
<Reference Include="Microsoft.AspNet.SignalR.Owin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.SignalR.Owin.1.0.1\lib\net45\Microsoft.AspNet.SignalR.Owin.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.SignalR.Owin.1.1.0\lib\net45\Microsoft.AspNet.SignalR.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.SignalR.SystemWeb">
|
<Reference Include="Microsoft.AspNet.SignalR.SystemWeb, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.1.0.1\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.1.1.0\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Owin.Host.SystemWeb">
|
<Reference Include="Microsoft.Owin.Host.SystemWeb">
|
||||||
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.1.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.1.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||||
@@ -64,7 +67,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin">
|
<Reference Include="Owin">
|
||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
@@ -176,14 +179,20 @@
|
|||||||
<Compile Include="BI\Interop\Pdf\PdfImporter.cs" />
|
<Compile Include="BI\Interop\Pdf\PdfImporter.cs" />
|
||||||
<Compile Include="BI\Interop\PluginServices\IDiscoScheduledTask.cs" />
|
<Compile Include="BI\Interop\PluginServices\IDiscoScheduledTask.cs" />
|
||||||
<Compile Include="BI\Interop\PluginServices\Utilities.cs" />
|
<Compile Include="BI\Interop\PluginServices\Utilities.cs" />
|
||||||
|
<Compile Include="BI\Interop\SignalRHandlers\AdminAuthorizedPersistentConnection.cs" />
|
||||||
|
<Compile Include="BI\Interop\SignalRHandlers\AuthorizedPersistentConnection.cs" />
|
||||||
|
<Compile Include="BI\Interop\SignalRHandlers\LogNotifications.cs" />
|
||||||
<Compile Include="BI\Interop\SignalRHandlers\RepositoryMonitorNotifications.cs" />
|
<Compile Include="BI\Interop\SignalRHandlers\RepositoryMonitorNotifications.cs" />
|
||||||
<Compile Include="BI\Interop\SignalRHandlers\UserHeldDevices.cs" />
|
<Compile Include="BI\Interop\SignalRHandlers\ScheduledTasksStatusNotifications.cs" />
|
||||||
|
<Compile Include="BI\Interop\SignalRHandlers\SignalRAuthenticationWorkaround.cs" />
|
||||||
|
<Compile Include="BI\Interop\SignalRHandlers\UserHeldDeviceNotifications.cs" />
|
||||||
<Compile Include="BI\JobBI\ManagedJobList.cs" />
|
<Compile Include="BI\JobBI\ManagedJobList.cs" />
|
||||||
<Compile Include="BI\JobBI\Searching.cs" />
|
<Compile Include="BI\JobBI\Searching.cs" />
|
||||||
<Compile Include="BI\JobBI\Statistics\DailyOpenedClosed.cs" />
|
<Compile Include="BI\JobBI\Statistics\DailyOpenedClosed.cs" />
|
||||||
<Compile Include="BI\JobBI\Utilities.cs" />
|
<Compile Include="BI\JobBI\Utilities.cs" />
|
||||||
<Compile Include="BI\UserBI\Searching.cs" />
|
<Compile Include="BI\UserBI\Searching.cs" />
|
||||||
<Compile Include="BI\UserBI\UserCache.cs" />
|
<Compile Include="BI\UserBI\UserCache.cs" />
|
||||||
|
<Compile Include="BI\UserBI\UserCachePruneTask.cs" />
|
||||||
<Compile Include="BI\UserBI\Utilities.cs" />
|
<Compile Include="BI\UserBI\Utilities.cs" />
|
||||||
<Compile Include="BI\Extensions\UtilityExtensions.cs" />
|
<Compile Include="BI\Extensions\UtilityExtensions.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1423")]
|
[assembly: AssemblyVersion("1.2.0516.1911")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
[assembly: AssemblyFileVersion("1.2.0516.1911")]
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.SignalR.Core" version="1.0.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.SignalR.Core" version="1.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.SignalR.Owin" version="1.0.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.SignalR.Owin" version="1.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.SignalR.SystemWeb" version="1.0.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.SignalR.SystemWeb" version="1.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Owin.Host.SystemWeb" version="1.0.1" targetFramework="net45" />
|
<package id="Microsoft.Owin.Host.SystemWeb" version="1.0.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
|
||||||
<package id="Newtonsoft.Json" version="5.0.4" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="5.0.5" targetFramework="net45" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net45" />
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="Rx-Core" version="2.1.30214.0" targetFramework="net45" />
|
<package id="Rx-Core" version="2.1.30214.0" targetFramework="net45" />
|
||||||
<package id="Rx-Interfaces" version="2.1.30214.0" targetFramework="net45" />
|
<package id="Rx-Interfaces" version="2.1.30214.0" targetFramework="net45" />
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.5.0.5\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1423")]
|
[assembly: AssemblyVersion("1.2.0516.1903")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
[assembly: AssemblyFileVersion("1.2.0516.1903")]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="5.0.4" targetFramework="net40-Client" />
|
<package id="Newtonsoft.Json" version="5.0.5" targetFramework="net40-Client" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1423")]
|
[assembly: AssemblyVersion("1.2.0516.1900")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
[assembly: AssemblyFileVersion("1.2.0516.1900")]
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2011/7/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" />
|
<UserProperties BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0514.1205")]
|
[assembly: AssemblyVersion("1.2.0516.1911")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0514.1205")]
|
[assembly: AssemblyFileVersion("1.2.0516.1911")]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="5.0.4" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="5.0.5" targetFramework="net45" />
|
||||||
<package id="Rx-Core" version="2.1.30214.0" targetFramework="net45" />
|
<package id="Rx-Core" version="2.1.30214.0" targetFramework="net45" />
|
||||||
<package id="Rx-Interfaces" version="2.1.30214.0" targetFramework="net45" />
|
<package id="Rx-Interfaces" version="2.1.30214.0" targetFramework="net45" />
|
||||||
<package id="Rx-Linq" version="2.1.30214.0" targetFramework="net45" />
|
<package id="Rx-Linq" version="2.1.30214.0" targetFramework="net45" />
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0514.1205")]
|
[assembly: AssemblyVersion("1.2.0516.1911")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0514.1205")]
|
[assembly: AssemblyFileVersion("1.2.0516.1911")]
|
||||||
@@ -39,8 +39,12 @@
|
|||||||
<Reference Include="EntityFramework">
|
<Reference Include="EntityFramework">
|
||||||
<HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
|
<HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.SignalR.Core">
|
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.1.0.1\lib\net40\Microsoft.AspNet.SignalR.Core.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.1.1.0\lib\net40\Microsoft.AspNet.SignalR.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.AspNet.SignalR.Owin">
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.SignalR.Owin.1.1.0\lib\net45\Microsoft.AspNet.SignalR.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@@ -48,7 +52,10 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Owin">
|
||||||
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Quartz">
|
<Reference Include="Quartz">
|
||||||
<HintPath>..\Resources\Libraries\Quartz\Quartz.dll</HintPath>
|
<HintPath>..\Resources\Libraries\Quartz\Quartz.dll</HintPath>
|
||||||
@@ -131,7 +138,6 @@
|
|||||||
<Compile Include="Tasks\ScheduledTasks.cs" />
|
<Compile Include="Tasks\ScheduledTasks.cs" />
|
||||||
<Compile Include="Tasks\ScheduledTasksLog.cs" />
|
<Compile Include="Tasks\ScheduledTasksLog.cs" />
|
||||||
<Compile Include="Tasks\ScheduledTaskStatus.cs" />
|
<Compile Include="Tasks\ScheduledTaskStatus.cs" />
|
||||||
<Compile Include="Tasks\ScheduledTasksLiveStatusService.cs" />
|
|
||||||
<Compile Include="Tasks\ScheduledTaskStatusLive.cs" />
|
<Compile Include="Tasks\ScheduledTaskStatusLive.cs" />
|
||||||
<Compile Include="Plugins\Features\UIExtension\UIExtensions.cs" />
|
<Compile Include="Plugins\Features\UIExtension\UIExtensions.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0514.1205")]
|
[assembly: AssemblyVersion("1.2.0516.1911")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0514.1205")]
|
[assembly: AssemblyFileVersion("1.2.0516.1911")]
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.SignalR.Core" version="1.0.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.SignalR.Core" version="1.1.0" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.AspNet.SignalR.Owin" version="1.1.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.SqlServer.Compact" version="4.0.8876.1" targetFramework="net45" />
|
<package id="Microsoft.SqlServer.Compact" version="4.0.8876.1" targetFramework="net45" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
|
||||||
<package id="Newtonsoft.Json" version="5.0.4" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="5.0.5" targetFramework="net45" />
|
||||||
|
<package id="Owin" version="1.0" targetFramework="net45" />
|
||||||
<package id="RazorGenerator.Mvc" version="2.0.1" targetFramework="net45" />
|
<package id="RazorGenerator.Mvc" version="2.0.1" targetFramework="net45" />
|
||||||
<package id="SqlServerCompact" version="4.0.8854.1" targetFramework="net40" />
|
<package id="SqlServerCompact" version="4.0.8854.1" targetFramework="net40" />
|
||||||
<package id="WebActivatorEx" version="2.0.1" targetFramework="net45" />
|
<package id="WebActivatorEx" version="2.0.1" targetFramework="net45" />
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
@@ -95,6 +95,7 @@
|
|||||||
<Compile Include="DataModelExtension\DocumentTemplateExtensions.cs" />
|
<Compile Include="DataModelExtension\DocumentTemplateExtensions.cs" />
|
||||||
<Compile Include="DataModelExtension\JobSubTypeExtensions.cs" />
|
<Compile Include="DataModelExtension\JobSubTypeExtensions.cs" />
|
||||||
<Compile Include="DataModelExtension\JobTypeExtensions.cs" />
|
<Compile Include="DataModelExtension\JobTypeExtensions.cs" />
|
||||||
|
<Compile Include="MvcExtensions\AuthorizeDiscoUsersAttribute.cs" />
|
||||||
<Compile Include="MvcExtensions\Bundles\Bundle.cs" />
|
<Compile Include="MvcExtensions\Bundles\Bundle.cs" />
|
||||||
<Compile Include="MvcExtensions\Bundles\BundleExtensions.cs" />
|
<Compile Include="MvcExtensions\Bundles\BundleExtensions.cs" />
|
||||||
<Compile Include="MvcExtensions\Bundles\BundleHandler.cs" />
|
<Compile Include="MvcExtensions\Bundles\BundleHandler.cs" />
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using Disco.BI.UserBI;
|
||||||
|
using Disco.Models.Repository;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
|
||||||
|
namespace Disco.Web
|
||||||
|
{
|
||||||
|
public class AuthorizeDiscoUsersAttribute : AuthorizeAttribute
|
||||||
|
{
|
||||||
|
string[] authorizedTypes;
|
||||||
|
|
||||||
|
public AuthorizeDiscoUsersAttribute(params string[] AuthorizedUserTypes)
|
||||||
|
{
|
||||||
|
if (AuthorizedUserTypes == null)
|
||||||
|
throw new ArgumentNullException("AuthorizedUserTypes");
|
||||||
|
if (AuthorizedUserTypes.Length == 0)
|
||||||
|
throw new ArgumentOutOfRangeException("AuthorizedUserTypes", "At least one Authorized User Type must be specified");
|
||||||
|
|
||||||
|
authorizedTypes = AuthorizedUserTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool AuthorizeCore(System.Web.HttpContextBase httpContext)
|
||||||
|
{
|
||||||
|
if (httpContext == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("httpContext");
|
||||||
|
}
|
||||||
|
|
||||||
|
var DiscoUser = UserCache.CurrentUser;
|
||||||
|
|
||||||
|
if (DiscoUser != null && authorizedTypes.Contains(DiscoUser.Type))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ using System.Web.Mvc;
|
|||||||
|
|
||||||
namespace Disco.Web
|
namespace Disco.Web
|
||||||
{
|
{
|
||||||
[Authorize(Roles = "Admin")]
|
[AuthorizeDiscoUsersAttribute(Disco.Models.Repository.User.Types.Admin)]
|
||||||
public class dbAdminController : dbController
|
public class dbAdminController : dbController
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1423")]
|
[assembly: AssemblyVersion("1.2.0516.1911")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
[assembly: AssemblyFileVersion("1.2.0516.1911")]
|
||||||
@@ -5,6 +5,6 @@
|
|||||||
<package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="5.0.4" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="5.0.5" targetFramework="net45" />
|
||||||
<package id="WebActivatorEx" version="2.0.1" targetFramework="net45" />
|
<package id="WebActivatorEx" version="2.0.1" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
+13
-10
@@ -46,14 +46,17 @@
|
|||||||
<Reference Include="DotNet.Highcharts">
|
<Reference Include="DotNet.Highcharts">
|
||||||
<HintPath>..\packages\DotNet.Highcharts.1.2\lib\DotNet.Highcharts.dll</HintPath>
|
<HintPath>..\packages\DotNet.Highcharts.1.2\lib\DotNet.Highcharts.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.SignalR.Core">
|
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.1.0.1\lib\net40\Microsoft.AspNet.SignalR.Core.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.1.1.0\lib\net40\Microsoft.AspNet.SignalR.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.SignalR.Owin">
|
<Reference Include="Microsoft.AspNet.SignalR.Owin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.SignalR.Owin.1.0.1\lib\net45\Microsoft.AspNet.SignalR.Owin.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.SignalR.Owin.1.1.0\lib\net45\Microsoft.AspNet.SignalR.Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.AspNet.SignalR.SystemWeb">
|
<Reference Include="Microsoft.AspNet.SignalR.SystemWeb, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.1.0.1\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.1.1.0\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.Owin.Host.SystemWeb">
|
<Reference Include="Microsoft.Owin.Host.SystemWeb">
|
||||||
@@ -61,7 +64,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin">
|
<Reference Include="Owin">
|
||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
@@ -163,7 +166,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="T4MVCExtensions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
|
<Reference Include="T4MVCExtensions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\T4MVCExtensions.3.6.1\lib\net40\T4MVCExtensions.dll</HintPath>
|
<HintPath>..\packages\T4MVCExtensions.3.6.4\lib\net40\T4MVCExtensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="WebActivatorEx">
|
<Reference Include="WebActivatorEx">
|
||||||
<HintPath>..\packages\WebActivatorEx.2.0.1\lib\net40\WebActivatorEx.dll</HintPath>
|
<HintPath>..\packages\WebActivatorEx.2.0.1\lib\net40\WebActivatorEx.dll</HintPath>
|
||||||
@@ -929,7 +932,7 @@
|
|||||||
<None Include="ClientSource\Scripts\Modules\jQueryUI-DynaTree.js">
|
<None Include="ClientSource\Scripts\Modules\jQueryUI-DynaTree.js">
|
||||||
<DependentUpon>jQueryUI-DynaTree.js.bundle</DependentUpon>
|
<DependentUpon>jQueryUI-DynaTree.js.bundle</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
<None Include="ClientSource\Scripts\Modules\jQuery-SignalR\jquery.signalR-1.0.1.js" />
|
<Content Include="ClientSource\Scripts\Modules\jQuery-SignalR\jquery.signalR-1.1.0.js" />
|
||||||
<Content Include="ClientSource\Scripts\Modules\jQueryUI-DynaTree.min.js">
|
<Content Include="ClientSource\Scripts\Modules\jQueryUI-DynaTree.min.js">
|
||||||
<DependentUpon>jQueryUI-DynaTree.js.bundle</DependentUpon>
|
<DependentUpon>jQueryUI-DynaTree.js.bundle</DependentUpon>
|
||||||
</Content>
|
</Content>
|
||||||
@@ -1858,7 +1861,7 @@
|
|||||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
</WebProjectProperties>
|
</WebProjectProperties>
|
||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
<UserProperties BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ namespace Disco.Web
|
|||||||
{
|
{
|
||||||
public DiscoApplication()
|
public DiscoApplication()
|
||||||
{
|
{
|
||||||
base.AuthenticateRequest += new EventHandler(DiscoApplication_AuthenticateRequest);
|
|
||||||
base.BeginRequest += new EventHandler(DiscoApplication_BeginRequest);
|
base.BeginRequest += new EventHandler(DiscoApplication_BeginRequest);
|
||||||
base.Error += new EventHandler(DiscoApplication_Error);
|
base.Error += new EventHandler(DiscoApplication_Error);
|
||||||
}
|
}
|
||||||
@@ -125,14 +124,6 @@ namespace Disco.Web
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region Authentication
|
#region Authentication
|
||||||
void DiscoApplication_AuthenticateRequest(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
User u = CurrentUser;
|
|
||||||
if (u != null)
|
|
||||||
{
|
|
||||||
base.Context.User = new GenericPrincipal(base.Context.User.Identity, new string[] { u.Type });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool InitialConfig { get; set; }
|
public static bool InitialConfig { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.2.0513.1423")]
|
[assembly: AssemblyVersion("1.2.0516.1911")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
[assembly: AssemblyFileVersion("1.2.0516.1911")]
|
||||||
Reference in New Issue
Block a user