diff --git a/Disco.BI/Disco.BI.csproj b/Disco.BI/Disco.BI.csproj index 72914227..b089a86e 100644 --- a/Disco.BI/Disco.BI.csproj +++ b/Disco.BI/Disco.BI.csproj @@ -46,14 +46,17 @@ ..\Resources\Libraries\iTextSharp\itextsharp.dll - - ..\packages\Microsoft.AspNet.SignalR.Core.1.0.1\lib\net40\Microsoft.AspNet.SignalR.Core.dll + + False + ..\packages\Microsoft.AspNet.SignalR.Core.1.1.0\lib\net40\Microsoft.AspNet.SignalR.Core.dll - - ..\packages\Microsoft.AspNet.SignalR.Owin.1.0.1\lib\net45\Microsoft.AspNet.SignalR.Owin.dll + + False + ..\packages\Microsoft.AspNet.SignalR.Owin.1.1.0\lib\net45\Microsoft.AspNet.SignalR.Owin.dll - - ..\packages\Microsoft.AspNet.SignalR.SystemWeb.1.0.1\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll + + False + ..\packages\Microsoft.AspNet.SignalR.SystemWeb.1.1.0\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll ..\packages\Microsoft.Owin.Host.SystemWeb.1.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll @@ -64,7 +67,7 @@ False - ..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll ..\packages\Owin.1.0\lib\net40\Owin.dll @@ -176,14 +179,20 @@ + + + - + + + + diff --git a/Disco.BI/Properties/AssemblyInfo.cs b/Disco.BI/Properties/AssemblyInfo.cs index 36273e05..6f7f843e 100644 --- a/Disco.BI/Properties/AssemblyInfo.cs +++ b/Disco.BI/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 // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0513.1423")] -[assembly: AssemblyFileVersion("1.2.0513.1423")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0516.1911")] +[assembly: AssemblyFileVersion("1.2.0516.1911")] \ No newline at end of file diff --git a/Disco.BI/packages.config b/Disco.BI/packages.config index e96019db..18312478 100644 --- a/Disco.BI/packages.config +++ b/Disco.BI/packages.config @@ -1,12 +1,12 @@  - - - + + + - + diff --git a/Disco.Client/Disco.Client.csproj b/Disco.Client/Disco.Client.csproj index 20cf3554..5b52dd3d 100644 --- a/Disco.Client/Disco.Client.csproj +++ b/Disco.Client/Disco.Client.csproj @@ -50,7 +50,7 @@ False - ..\packages\Newtonsoft.Json.5.0.4\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.5\lib\net40\Newtonsoft.Json.dll @@ -122,7 +122,7 @@ - + diff --git a/Disco.Client/Properties/AssemblyInfo.cs b/Disco.Client/Properties/AssemblyInfo.cs index ecc40210..f38dbcd5 100644 --- a/Disco.Client/Properties/AssemblyInfo.cs +++ b/Disco.Client/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 // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0513.1423")] -[assembly: AssemblyFileVersion("1.2.0513.1423")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0516.1903")] +[assembly: AssemblyFileVersion("1.2.0516.1903")] \ No newline at end of file diff --git a/Disco.Client/packages.config b/Disco.Client/packages.config index 4ae01791..10c7053c 100644 --- a/Disco.Client/packages.config +++ b/Disco.Client/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs b/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs index 0420e515..c38d38ae 100644 --- a/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs +++ b/Disco.ClientBootstrapper/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 // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0513.1423")] -[assembly: AssemblyFileVersion("1.2.0513.1423")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0516.1900")] +[assembly: AssemblyFileVersion("1.2.0516.1900")] \ No newline at end of file diff --git a/Disco.Data/Disco.Data.csproj b/Disco.Data/Disco.Data.csproj index e95d39ed..bb89250e 100644 --- a/Disco.Data/Disco.Data.csproj +++ b/Disco.Data/Disco.Data.csproj @@ -42,7 +42,7 @@ False - ..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll @@ -159,7 +159,7 @@ - + diff --git a/Disco.Data/Properties/AssemblyInfo.cs b/Disco.Data/Properties/AssemblyInfo.cs index d67af2e6..d8a9b2ad 100644 --- a/Disco.Data/Properties/AssemblyInfo.cs +++ b/Disco.Data/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 // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0514.1205")] -[assembly: AssemblyFileVersion("1.2.0514.1205")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0516.1911")] +[assembly: AssemblyFileVersion("1.2.0516.1911")] \ No newline at end of file diff --git a/Disco.Data/packages.config b/Disco.Data/packages.config index a5279a91..cd8116fd 100644 --- a/Disco.Data/packages.config +++ b/Disco.Data/packages.config @@ -1,7 +1,7 @@  - + diff --git a/Disco.Models/Properties/AssemblyInfo.cs b/Disco.Models/Properties/AssemblyInfo.cs index d7ea0617..5e3d0443 100644 --- a/Disco.Models/Properties/AssemblyInfo.cs +++ b/Disco.Models/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 // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0514.1205")] -[assembly: AssemblyFileVersion("1.2.0514.1205")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0516.1911")] +[assembly: AssemblyFileVersion("1.2.0516.1911")] \ No newline at end of file diff --git a/Disco.Services/Disco.Services.csproj b/Disco.Services/Disco.Services.csproj index 20f7116b..f6624464 100644 --- a/Disco.Services/Disco.Services.csproj +++ b/Disco.Services/Disco.Services.csproj @@ -39,8 +39,12 @@ ..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll - - ..\packages\Microsoft.AspNet.SignalR.Core.1.0.1\lib\net40\Microsoft.AspNet.SignalR.Core.dll + + False + ..\packages\Microsoft.AspNet.SignalR.Core.1.1.0\lib\net40\Microsoft.AspNet.SignalR.Core.dll + + + ..\packages\Microsoft.AspNet.SignalR.Owin.1.1.0\lib\net45\Microsoft.AspNet.SignalR.Owin.dll True @@ -48,7 +52,10 @@ False - ..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Owin.1.0\lib\net40\Owin.dll ..\Resources\Libraries\Quartz\Quartz.dll @@ -131,7 +138,6 @@ - diff --git a/Disco.Services/Properties/AssemblyInfo.cs b/Disco.Services/Properties/AssemblyInfo.cs index a760cbb9..c7288ed4 100644 --- a/Disco.Services/Properties/AssemblyInfo.cs +++ b/Disco.Services/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 // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0514.1205")] -[assembly: AssemblyFileVersion("1.2.0514.1205")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0516.1911")] +[assembly: AssemblyFileVersion("1.2.0516.1911")] \ No newline at end of file diff --git a/Disco.Services/packages.config b/Disco.Services/packages.config index 8f686527..9c799d15 100644 --- a/Disco.Services/packages.config +++ b/Disco.Services/packages.config @@ -1,10 +1,12 @@  - + + - + + diff --git a/Disco.Web.Extensions/Disco.Web.Extensions.csproj b/Disco.Web.Extensions/Disco.Web.Extensions.csproj index 22a1061f..a4189905 100644 --- a/Disco.Web.Extensions/Disco.Web.Extensions.csproj +++ b/Disco.Web.Extensions/Disco.Web.Extensions.csproj @@ -45,7 +45,7 @@ False - ..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll @@ -95,6 +95,7 @@ + diff --git a/Disco.Web.Extensions/MvcExtensions/AuthorizeDiscoUsersAttribute.cs b/Disco.Web.Extensions/MvcExtensions/AuthorizeDiscoUsersAttribute.cs new file mode 100644 index 00000000..eab47f3b --- /dev/null +++ b/Disco.Web.Extensions/MvcExtensions/AuthorizeDiscoUsersAttribute.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; + } + } +} diff --git a/Disco.Web.Extensions/MvcExtensions/dbAdminController.cs b/Disco.Web.Extensions/MvcExtensions/dbAdminController.cs index bd3d7584..3cd49070 100644 --- a/Disco.Web.Extensions/MvcExtensions/dbAdminController.cs +++ b/Disco.Web.Extensions/MvcExtensions/dbAdminController.cs @@ -6,7 +6,7 @@ using System.Web.Mvc; namespace Disco.Web { - [Authorize(Roles = "Admin")] + [AuthorizeDiscoUsersAttribute(Disco.Models.Repository.User.Types.Admin)] public class dbAdminController : dbController { } diff --git a/Disco.Web.Extensions/Properties/AssemblyInfo.cs b/Disco.Web.Extensions/Properties/AssemblyInfo.cs index 8026400f..8b3f2707 100644 --- a/Disco.Web.Extensions/Properties/AssemblyInfo.cs +++ b/Disco.Web.Extensions/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 // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0513.1423")] -[assembly: AssemblyFileVersion("1.2.0513.1423")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0516.1911")] +[assembly: AssemblyFileVersion("1.2.0516.1911")] \ No newline at end of file diff --git a/Disco.Web.Extensions/packages.config b/Disco.Web.Extensions/packages.config index aa3d4e19..0f150efe 100644 --- a/Disco.Web.Extensions/packages.config +++ b/Disco.Web.Extensions/packages.config @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/Disco.Web/Disco.Web.csproj b/Disco.Web/Disco.Web.csproj index 8b97d598..f22a7e94 100644 --- a/Disco.Web/Disco.Web.csproj +++ b/Disco.Web/Disco.Web.csproj @@ -46,14 +46,17 @@ ..\packages\DotNet.Highcharts.1.2\lib\DotNet.Highcharts.dll - - ..\packages\Microsoft.AspNet.SignalR.Core.1.0.1\lib\net40\Microsoft.AspNet.SignalR.Core.dll + + False + ..\packages\Microsoft.AspNet.SignalR.Core.1.1.0\lib\net40\Microsoft.AspNet.SignalR.Core.dll - - ..\packages\Microsoft.AspNet.SignalR.Owin.1.0.1\lib\net45\Microsoft.AspNet.SignalR.Owin.dll + + False + ..\packages\Microsoft.AspNet.SignalR.Owin.1.1.0\lib\net45\Microsoft.AspNet.SignalR.Owin.dll - - ..\packages\Microsoft.AspNet.SignalR.SystemWeb.1.0.1\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll + + False + ..\packages\Microsoft.AspNet.SignalR.SystemWeb.1.1.0\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll @@ -61,7 +64,7 @@ False - ..\packages\Newtonsoft.Json.5.0.4\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.5.0.5\lib\net45\Newtonsoft.Json.dll ..\packages\Owin.1.0\lib\net40\Owin.dll @@ -163,7 +166,7 @@ False - ..\packages\T4MVCExtensions.3.6.1\lib\net40\T4MVCExtensions.dll + ..\packages\T4MVCExtensions.3.6.4\lib\net40\T4MVCExtensions.dll ..\packages\WebActivatorEx.2.0.1\lib\net40\WebActivatorEx.dll @@ -929,7 +932,7 @@ jQueryUI-DynaTree.js.bundle - + jQueryUI-DynaTree.js.bundle @@ -1858,7 +1861,7 @@ False - + diff --git a/Disco.Web/Global.asax.cs b/Disco.Web/Global.asax.cs index 4766dec1..92a466ed 100644 --- a/Disco.Web/Global.asax.cs +++ b/Disco.Web/Global.asax.cs @@ -21,7 +21,6 @@ namespace Disco.Web { public DiscoApplication() { - base.AuthenticateRequest += new EventHandler(DiscoApplication_AuthenticateRequest); base.BeginRequest += new EventHandler(DiscoApplication_BeginRequest); base.Error += new EventHandler(DiscoApplication_Error); } @@ -125,14 +124,6 @@ namespace Disco.Web } #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; } diff --git a/Disco.Web/Properties/AssemblyInfo.cs b/Disco.Web/Properties/AssemblyInfo.cs index 719225a7..4d5f59a1 100644 --- a/Disco.Web/Properties/AssemblyInfo.cs +++ b/Disco.Web/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.2.0513.1423")] -[assembly: AssemblyFileVersion("1.2.0513.1423")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0516.1911")] +[assembly: AssemblyFileVersion("1.2.0516.1911")] \ No newline at end of file