cleanup and lineendings.

This commit is contained in:
Claus
2017-07-10 15:20:17 +02:00
parent c0a6c58a07
commit ad886efa62
5 changed files with 25 additions and 37 deletions

View File

@@ -10,7 +10,7 @@ namespace Umbraco.Core.Models.Membership
/// <remarks>Will be left internal until a proper Membership implementation is part of the roadmap</remarks>
public interface IUser : IMembershipUser, IRememberBeingDirty, ICanBeDirty
{
UserState UserState { get; }
UserState UserState { get; }
string Name { get; set; }
int SessionTimeout { get; set; }
@@ -18,8 +18,8 @@ namespace Umbraco.Core.Models.Membership
int[] StartMediaIds { get; set; }
string Language { get; set; }
DateTime? EmailConfirmedDate { get; set; }
DateTime? InvitedDate { get; set; }
DateTime? EmailConfirmedDate { get; set; }
DateTime? InvitedDate { get; set; }
/// <summary>
/// Gets the groups that user is part of
@@ -45,8 +45,8 @@ namespace Umbraco.Core.Models.Membership
/// <summary>
/// Will hold the media file system relative path of the users custom avatar if they uploaded one
/// </summary>
string Avatar { get; set; }
string Avatar { get; set; }
/// <summary>
/// Returns all start node Ids assigned to the user based on both the explicit start node ids assigned to the user and any start node Ids assigned to it's user groups
/// </summary>

View File

@@ -661,7 +661,7 @@ namespace Umbraco.Core.Persistence.Repositories
if (contentVerDto != null)
{
contentVersionDto.Id = contentVerDto.Id;
Database.Update(contentVersionDto);
Database.Update(contentVersionDto);
}
Database.Update(dto);
@@ -884,7 +884,7 @@ order by umbracoNode.{2}, umbracoNode.parentID, umbracoNode.sortOrder",
var repo = new PermissionRepository<IContent>(UnitOfWork, _cacheHelper, SqlSyntax);
repo.AssignEntityPermission(entity, permission, groupIds);
}
/// <summary>
/// Returns permissions directly assigned to the content item for all user groups
/// </summary>

View File

@@ -362,10 +362,8 @@ namespace Umbraco.Core.Services
if (raiseEvents)
uow.Events.Dispatch(SavedUser, this, new SaveEventArgs<IUser>(asArray, false));
}
}
/// <summary>
/// This is just the default user group that the membership provider will use
/// </summary>

View File

@@ -3,9 +3,6 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Configuration;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -23,7 +20,6 @@ using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Manifest;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Identity;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Security;
@@ -32,9 +28,7 @@ using Umbraco.Web.Mvc;
using Umbraco.Web.Security.Identity;
using Umbraco.Web.Trees;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Web.WebApi.Filters;
using Umbraco.Core.Services;
using Umbraco.Web.Security;
using Action = umbraco.BusinessLogic.Actions.Action;
using Constants = Umbraco.Core.Constants;
@@ -78,7 +72,7 @@ namespace Umbraco.Web.Editors
() => View(GlobalSettings.Path.EnsureEndsWith('/') + "Views/Default.cshtml"),
() => View(GlobalSettings.Path.EnsureEndsWith('/') + "Views/Default.cshtml"));
}
[HttpGet]
public async Task<ActionResult> VerifyInvite(string invite)
{
@@ -86,17 +80,17 @@ namespace Umbraco.Web.Editors
{
Logger.Warn<BackOfficeController>("VerifyUser endpoint reached with invalid token: NULL");
return RedirectToAction("Default");
}
}
var parts = Server.UrlDecode(invite).Split('|');
if (parts.Length != 2)
{
{
Logger.Warn<BackOfficeController>("VerifyUser endpoint reached with invalid token: " + invite);
return RedirectToAction("Default");
}
var token = parts[1];
var token = parts[1];
var decoded = token.FromUrlBase64();
if (decoded.IsNullOrWhiteSpace())
@@ -111,7 +105,7 @@ namespace Umbraco.Web.Editors
{
Logger.Warn<BackOfficeController>("VerifyUser endpoint reached with invalid token: " + invite);
return RedirectToAction("Default");
}
}
var identityUser = await UserManager.FindByIdAsync(intId);
if (identityUser == null)
@@ -127,8 +121,8 @@ namespace Umbraco.Web.Editors
Logger.Warn<BackOfficeController>("Could not verify email, Error: " + string.Join(",", result.Errors) + ", Token: " + invite);
return RedirectToAction("Default");
}
//sign the user in
//sign the user in
AuthenticationManager.SignOut(
Core.Constants.Security.BackOfficeAuthenticationType,
@@ -137,7 +131,7 @@ namespace Umbraco.Web.Editors
await SignInManager.SignInAsync(identityUser, false, false);
return new RedirectResult(Url.Action("Default") + "#/login/false?invite=1");
}
}
/// <summary>
/// This Action is used by the installer when an upgrade is detected but the admin user is not logged in. We need to
@@ -255,7 +249,7 @@ namespace Umbraco.Web.Editors
[MinifyJavaScriptResult(Order = 1)]
public JavaScriptResult ServerVariables()
{
var serverVars = new BackOfficeServerVariables(Url, ApplicationContext, UmbracoConfig.For.UmbracoSettings());
var serverVars = new BackOfficeServerVariables(Url, ApplicationContext, UmbracoConfig.For.UmbracoSettings());
//cache the result if debugging is disabled
var result = HttpContext.IsDebuggingEnabled
@@ -267,8 +261,8 @@ namespace Umbraco.Web.Editors
return JavaScript(result);
}
[HttpPost]
public ActionResult ExternalLogin(string provider, string redirectUrl = null)
@@ -447,7 +441,7 @@ namespace Umbraco.Web.Editors
if (loginInfo.Email.IsNullOrWhiteSpace()) throw new InvalidOperationException("The Email value cannot be null");
if (loginInfo.ExternalIdentity.Name.IsNullOrWhiteSpace()) throw new InvalidOperationException("The Name value cannot be null");
var groups = Services.UserService.GetUserGroupsByAlias(autoLinkOptions.GetDefaultUserGroups(UmbracoContext, loginInfo));
var groups = Services.UserService.GetUserGroupsByAlias(autoLinkOptions.GetDefaultUserGroups(UmbracoContext, loginInfo));
var autoLinkUser = new BackOfficeIdentityUser
{
@@ -455,9 +449,9 @@ namespace Umbraco.Web.Editors
Name = loginInfo.ExternalIdentity.Name,
AllowedSections = autoLinkOptions.GetDefaultAllowedSections(UmbracoContext, loginInfo),
Culture = autoLinkOptions.GetDefaultCulture(UmbracoContext, loginInfo),
UserName = loginInfo.Email,
UserName = loginInfo.Email,
Groups = groups.Select(x => x.ToReadOnlyGroup()).ToArray()
};
};
//call the callback if one is assigned
if (autoLinkOptions.OnAutoLinking != null)
@@ -501,8 +495,6 @@ namespace Umbraco.Web.Editors
return false;
}
/// <summary>
/// Returns the JavaScript blocks for any legacy trees declared

View File

@@ -5,9 +5,7 @@ using System.Runtime.Serialization;
using Umbraco.Core.Models.Membership;
namespace Umbraco.Web.Models.ContentEditing
{
{
/// <summary>
/// The user model used for paging and listing users in the UI
/// </summary>
@@ -59,8 +57,8 @@ namespace Umbraco.Web.Models.ContentEditing
/// </summary>
[DataMember(Name = "isCurrentUser")]
[ReadOnly(true)]
public bool IsCurrentUser { get; set; }
public bool IsCurrentUser { get; set; }
/// <summary>
/// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes.
/// </summary>