Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0070d8b913 | |||
| 9c0500325d | |||
| eda7f1e527 | |||
| 018a066f86 | |||
| e33a28ac19 | |||
| 6205d8a9f9 | |||
| 0ef57d819c |
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user