mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
Misc fixes, component upgrades.
This commit is contained in:
parent
2337ebd811
commit
bb5808a76b
|
@ -107,7 +107,7 @@ from u in r.Users
|
|||
var users = uClient.GetByIds(userIds);
|
||||
|
||||
return (from u in users
|
||||
where u.UserName.Contains(usernameToMatch)
|
||||
where u.UserName.ToLower().Contains(usernameToMatch.ToLower())
|
||||
select u.UserName).ToArray();
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public override string[] GetRolesForUser(string username)
|
|||
var client = rClient.As<RedisRole>();
|
||||
var uClient = rClient.As<RedisMember>();
|
||||
|
||||
var user = uClient.GetAll().SingleOrDefault(u => u.UserName == username);
|
||||
var user = uClient.GetAll().SingleOrDefault(u => u.UserName.ToLower() == username.ToLower());
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ public override bool IsUserInRole(string username, string roleName)
|
|||
var client = rClient.As<RedisRole>();
|
||||
var uClient = rClient.As<RedisMember>();
|
||||
|
||||
var user = uClient.GetAll().SingleOrDefault(u => u.UserName == username);
|
||||
var user = uClient.GetAll().SingleOrDefault(u => u.UserName.ToLower() == username.ToLower());
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.7\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NServiceKit.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
@ -104,8 +104,9 @@
|
|||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Net.Http.Formatting">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3-beta1\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
|
@ -116,33 +117,35 @@
|
|||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3-beta1\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.2\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.2\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.2\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3-beta1\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3-beta1\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3-beta1\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.2\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3-beta1\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3-beta1\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3-beta1\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3-beta1\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Web" />
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Routing;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/// <autosync enabled="true" />
|
||||
/// <reference path="jquery-2.1.1.js" />
|
||||
/// <reference path="jquery.validate.unobtrusive.js" />
|
||||
/// <reference path="jquery.validate.js" />
|
||||
/// <reference path="bfs.js" />
|
||||
/// <reference path="jsrender.min.js" />
|
||||
|
@ -26,3 +25,4 @@
|
|||
/// <reference path="trumbowyg/plugins/base64/trumbowyg.base64.js" />
|
||||
/// <reference path="trumbowyg/plugins/colors/trumbowyg.colors.js" />
|
||||
/// <reference path="trumbowyg/plugins/upload/trumbowyg.upload.js" />
|
||||
/// <reference path="jquery.validate.unobtrusive.min.js" />
|
||||
|
|
23
Scripts/jquery.validate.unobtrusive.js
vendored
23
Scripts/jquery.validate.unobtrusive.js
vendored
|
@ -99,8 +99,19 @@
|
|||
}
|
||||
|
||||
function onReset(event) { // 'this' is the form element
|
||||
var $form = $(this);
|
||||
var $form = $(this),
|
||||
key = '__jquery_unobtrusive_validation_form_reset';
|
||||
if ($form.data(key)) {
|
||||
return;
|
||||
}
|
||||
// Set a flag that indicates we're currently resetting the form.
|
||||
$form.data(key, true);
|
||||
try {
|
||||
$form.data("validator").resetForm();
|
||||
} finally {
|
||||
$form.removeData(key);
|
||||
}
|
||||
|
||||
$form.find(".validation-summary-errors")
|
||||
.addClass("validation-summary-valid")
|
||||
.removeClass("validation-summary-errors");
|
||||
|
@ -386,7 +397,15 @@
|
|||
$.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
|
||||
var paramName = appendModelPrefix(fieldName, prefix);
|
||||
value.data[paramName] = function () {
|
||||
return $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']").val();
|
||||
var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']");
|
||||
// For checkboxes and radio buttons, only pick up values from checked fields.
|
||||
if (field.is(":checkbox")) {
|
||||
return field.filter(":checked").val() || field.filter(":hidden").val() || '';
|
||||
}
|
||||
else if (field.is(":radio")) {
|
||||
return field.filter(":checked").val() || '';
|
||||
}
|
||||
return field.val();
|
||||
};
|
||||
});
|
||||
|
||||
|
|
2
Scripts/jquery.validate.unobtrusive.min.js
vendored
2
Scripts/jquery.validate.unobtrusive.min.js
vendored
File diff suppressed because one or more lines are too long
16
Web.config
16
Web.config
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
http://go.microsoft.com/fwlink/?LinkId=301880
|
||||
|
@ -72,20 +72,20 @@
|
|||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0"/>
|
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.webServer>
|
||||
|
||||
<modules>
|
||||
</modules>
|
||||
<urlCompression doDynamicCompression="true" />
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
<modules>
|
||||
</modules>
|
||||
<urlCompression doDynamicCompression="true"/>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
</system.webServer>
|
||||
</handlers></system.webServer>
|
||||
</configuration>
|
||||
|
|
|
@ -7,22 +7,22 @@
|
|||
<package id="Microsoft.ApplicationInsights.PerformanceCollector" version="0.12.0-build17386" targetFramework="net45" />
|
||||
<package id="Microsoft.ApplicationInsights.RuntimeTelemetry" version="0.12.0-build17386" targetFramework="net45" />
|
||||
<package id="Microsoft.ApplicationInsights.Web" version="0.12.0-build17386" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.2" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.2" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3-beta1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3-beta1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.2" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.2" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.2" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.2" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3-beta1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3-beta1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3-beta1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3-beta1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3-beta1" targetFramework="net45" />
|
||||
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
|
||||
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
|
||||
<package id="Microsoft.Diagnostics.Instrumentation.Extensions.Intercept" version="0.12.0-build02810" targetFramework="net45" />
|
||||
<package id="Microsoft.Diagnostics.Tracing.EventSource.Redist" version="1.1.14-beta" targetFramework="net45" />
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.2" targetFramework="net45" />
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3-beta1" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="6.0.7" targetFramework="net45" />
|
||||
<package id="NServiceKit.Common" version="1.0.27" targetFramework="net45" />
|
||||
<package id="NServiceKit.Redis" version="1.0.7" targetFramework="net45" />
|
||||
<package id="NServiceKit.Text" version="1.0.10" targetFramework="net45" />
|
||||
|
|
Loading…
Reference in New Issue
Block a user