Compare commits

...

7 Commits

Author SHA1 Message Date
Sebastiaan Janssen 0070d8b913 Bump version 2017-09-19 14:23:58 +02:00
Sebastiaan Janssen 9c0500325d Merge remote-tracking branch 'origin/dev-v7' into dev-v7.7
# Conflicts:
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoVersion.cs
#	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
2017-09-19 14:23:26 +02:00
Sebastiaan Janssen eda7f1e527 Bump version 2017-09-19 14:17:19 +02:00
Sebastiaan Janssen 018a066f86 U4-10428 Can't drag Image in Image Cropper (in Umbraco 7.6.7) 2017-09-19 14:10:20 +02:00
Sebastiaan Janssen e33a28ac19 Making sure we don't build Belle twice for the documentation 2017-09-19 11:38:20 +02:00
Shannon 6205d8a9f9 Merge remote-tracking branch 'origin/dev-v7' into dev-v7.7
# Conflicts:
#	src/Umbraco.Web/Editors/AuthenticationController.cs
2017-09-19 13:34:08 +10:00
Shannon 0ef57d819c removes uneeded null checks from AuthenticationController for raising UserManager events 2017-09-19 13:31:43 +10:00
6 changed files with 67 additions and 78 deletions
@@ -15,40 +15,38 @@ function Build-UmbracoDocs
################ Do the UI docs
# create Belle build folder, so that we don't cause a Belle rebuild
$belleBuildDir = "$src\Umbraco.Web.UI.Client\build"
if (-not (Test-Path $belleBuildDir))
# No need to build belle again if it exists
$belleAppJs = "$src\Umbraco.Web.UI\Umbraco\js\app.js"
if(-not (Test-Path $belleAppJs))
{
mkdir $belleBuildDir > $null
# get a temp clean node env (will restore)
Sandbox-Node $uenv
push-location "$($uenv.SolutionRoot)\src\Umbraco.Web.UI.Client"
write "node version is:" > $tmp\belle.log
&node -v >> $tmp\belle.log 2>&1
write "npm version is:" >> $tmp\belle.log 2>&1
&npm -v >> $tmp\belle.log 2>&1
write "cleaning npm cache" >> $tmp\belle.log 2>&1
&npm cache clean >> $tmp\belle.log 2>&1
write "installing bower" >> $tmp\belle.log 2>&1
&npm install -g bower >> $tmp\belle.log 2>&1
write "installing gulp" >> $tmp\belle.log 2>&1
&npm install -g gulp >> $tmp\belle.log 2>&1
write "installing gulp-cli" >> $tmp\belle.log 2>&1
&npm install -g gulp-cli --quiet >> $tmp\belle.log 2>&1
write "executing npm install" >> $tmp\belle.log 2>&1
&npm install >> $tmp\belle.log 2>&1
write "building docs using gulp" >> $tmp\belle.log 2>&1
&gulp docs >> $tmp\belle.log 2>&1
pop-location
# fixme - should we filter the log to find errors?
#get-content .\build.tmp\belle-docs.log | %{ if ($_ -match "build") { write $_}}
} else {
Write-Host "Skipping belle build, $belleAppJs already exists"
}
Write-Host "Build UI documentation"
# get a temp clean node env (will restore)
Sandbox-Node $uenv
push-location "$($uenv.SolutionRoot)\src\Umbraco.Web.UI.Client"
write "node version is:" > $tmp\belle.log
&node -v >> $tmp\belle.log 2>&1
write "npm version is:" >> $tmp\belle.log 2>&1
&npm -v >> $tmp\belle.log 2>&1
write "cleaning npm cache" >> $tmp\belle.log 2>&1
&npm cache clean >> $tmp\belle.log 2>&1
write "installing bower" >> $tmp\belle.log 2>&1
&npm install -g bower >> $tmp\belle.log 2>&1
write "installing gulp" >> $tmp\belle.log 2>&1
&npm install -g gulp >> $tmp\belle.log 2>&1
write "installing gulp-cli" >> $tmp\belle.log 2>&1
&npm install -g gulp-cli --quiet >> $tmp\belle.log 2>&1
write "executing npm install" >> $tmp\belle.log 2>&1
&npm install >> $tmp\belle.log 2>&1
write "building docs using gulp" >> $tmp\belle.log 2>&1
&gulp docs >> $tmp\belle.log 2>&1
pop-location
# fixme - should we filter the log to find errors?
#get-content .\build.tmp\belle-docs.log | %{ if ($_ -match "build") { write $_}}
# change baseUrl
$baseUrl = "https://our.umbraco.org/apidocs/ui/"
$indexPath = "$src/Umbraco.Web.UI.Client/docs/api/index.html"
+2 -2
View File
@@ -11,5 +11,5 @@ using System.Resources;
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("7.7.0")]
[assembly: AssemblyInformationalVersion("7.7.0")]
[assembly: AssemblyFileVersion("7.7.1")]
[assembly: AssemblyInformationalVersion("7.7.1")]
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("7.7.0");
private static readonly Version Version = new Version("7.7.1");
/// <summary>
/// Gets the current version of Umbraco.
@@ -304,7 +304,7 @@ ul.color-picker li a {
top: 0;
left: 0;
cursor: move;
z-index: 499;
z-index: 6001;
position: absolute;
}
+2 -2
View File
@@ -1027,9 +1027,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\"
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>7700</DevelopmentServerPort>
<DevelopmentServerPort>7710</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:7700</IISUrl>
<IISUrl>http://localhost:7710</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
@@ -136,7 +136,7 @@ namespace Umbraco.Web.Editors
if (attempt == ValidateRequestAttempt.Success)
{
return true;
}
}
return false;
}
@@ -219,17 +219,15 @@ namespace Umbraco.Web.Editors
//Sign the user in with username/password, this also gives a chance for developers to
//custom verify the credentials and auto-link user accounts with a custom IBackOfficePasswordChecker
var result = await SignInManager.PasswordSignInAsync(
loginModel.Username, loginModel.Password, isPersistent: true, shouldLockout: true);
loginModel.Username, loginModel.Password, isPersistent: true, shouldLockout: true);
switch (result)
{
case SignInStatus.Success:
//get the user
var user = Services.UserService.GetByUsername(loginModel.Username);
if (UserManager != null)
UserManager.RaiseLoginSuccessEvent(user.Id);
UserManager.RaiseLoginSuccessEvent(user.Id);
return SetPrincipalAndReturnUserDetail(user);
case SignInStatus.RequiresVerification:
@@ -239,10 +237,10 @@ namespace Umbraco.Web.Editors
{
throw new HttpResponseException(
Request.CreateErrorResponse(
HttpStatusCode.BadRequest,
HttpStatusCode.BadRequest,
"UserManager does not implement " + typeof(IUmbracoBackOfficeTwoFactorOptions)));
}
}
var twofactorView = twofactorOptions.GetTwoFactorView(
TryGetOwinContext().Result,
UmbracoContext,
@@ -256,17 +254,16 @@ namespace Umbraco.Web.Editors
typeof(IUmbracoBackOfficeTwoFactorOptions) + ".GetTwoFactorView returned an empty string"));
}
var attemptedUser = Services.UserService.GetByUsername(loginModel.Username);
//create a with information to display a custom two factor send code view
var attemptedUser = Services.UserService.GetByUsername(loginModel.Username);
//create a with information to display a custom two factor send code view
var verifyResponse = Request.CreateResponse(HttpStatusCode.PaymentRequired, new
{
twoFactorView = twofactorView,
userId = attemptedUser.Id
});
if (UserManager != null)
UserManager.RaiseLoginRequiresVerificationEvent(attemptedUser.Id);
UserManager.RaiseLoginRequiresVerificationEvent(attemptedUser.Id);
return verifyResponse;
@@ -304,19 +301,18 @@ namespace Umbraco.Web.Editors
var code = await UserManager.GeneratePasswordResetTokenAsync(identityUser.Id);
var callbackUrl = ConstructCallbackUrl(identityUser.Id, code);
var message = Services.TextService.Localize("resetPasswordEmailCopyFormat",
//Ensure the culture of the found user is used for the email!
var message = Services.TextService.Localize("resetPasswordEmailCopyFormat",
//Ensure the culture of the found user is used for the email!
UserExtensions.GetUserCulture(identityUser.Culture, Services.TextService),
new[] { identityUser.UserName, callbackUrl });
await UserManager.SendEmailAsync(identityUser.Id,
Services.TextService.Localize("login/resetPasswordEmailCopySubject",
//Ensure the culture of the found user is used for the email!
Services.TextService.Localize("login/resetPasswordEmailCopySubject",
//Ensure the culture of the found user is used for the email!
UserExtensions.GetUserCulture(identityUser.Culture, Services.TextService)),
message);
if (UserManager != null)
UserManager.RaiseForgotPasswordRequestedEvent(user.Id);
UserManager.RaiseForgotPasswordRequestedEvent(user.Id);
}
}
@@ -376,27 +372,23 @@ namespace Umbraco.Web.Editors
throw new HttpResponseException(HttpStatusCode.NotFound);
}
var result = await SignInManager.TwoFactorSignInAsync(model.Provider, model.Code, isPersistent: true, rememberBrowser: false);
var result = await SignInManager.TwoFactorSignInAsync(model.Provider, model.Code, isPersistent: true, rememberBrowser: false);
var user = Services.UserService.GetByUsername(userName);
switch (result)
{
case SignInStatus.Success:
if (UserManager != null)
UserManager.RaiseLoginSuccessEvent(user.Id);
UserManager.RaiseLoginSuccessEvent(user.Id);
return SetPrincipalAndReturnUserDetail(user);
case SignInStatus.LockedOut:
if (UserManager != null)
UserManager.RaiseAccountLockedEvent(user.Id);
return Request.CreateValidationErrorResponse("User is locked out");
UserManager.RaiseAccountLockedEvent(user.Id);
return Request.CreateValidationErrorResponse("User is locked out");
case SignInStatus.Failure:
default:
return Request.CreateValidationErrorResponse("Invalid code");
}
}
}
/// <summary>
/// Processes a set password request. Validates the request and sets a new password.
/// </summary>
@@ -430,8 +422,7 @@ namespace Umbraco.Web.Editors
}
}
if (UserManager != null)
UserManager.RaiseForgotPasswordChangedSuccessEvent(model.UserId);
UserManager.RaiseForgotPasswordChangedSuccessEvent(model.UserId);
return Request.CreateResponse(HttpStatusCode.OK);
}
return Request.CreateValidationErrorResponse(
@@ -492,7 +483,7 @@ namespace Umbraco.Web.Editors
// Get an mvc helper to get the url
var http = EnsureHttpContext();
var urlHelper = new UrlHelper(http.Request.RequestContext);
var action = urlHelper.Action("ValidatePasswordResetCode", "BackOffice",
var action = urlHelper.Action("ValidatePasswordResetCode", "BackOffice",
new
{
area = GlobalSettings.UmbracoMvcArea,
@@ -504,19 +495,19 @@ namespace Umbraco.Web.Editors
var applicationUri = new Uri(ApplicationContext.UmbracoApplicationUrl);
var callbackUri = new Uri(applicationUri, action);
return callbackUri.ToString();
}
}
private HttpContextBase EnsureHttpContext()
{
var attempt = this.TryGetHttpContext();
if (attempt.Success == false)
throw new InvalidOperationException("This method requires that an HttpContext be active");
return attempt.Result;
}
}
private void AddModelErrors(IdentityResult result, string prefix = "")
{
foreach (var error in result.Errors)