Merge remote-tracking branch 'origin/v8/dev' into v8/feature/AB4550-segments-ui-variant-picker
This commit is contained in:
@@ -77,7 +77,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
public IEnumerable<IAuditItem> Get(AuditType type, IQuery<IAuditItem> query)
|
||||
{
|
||||
var sqlClause = GetBaseQuery(false)
|
||||
.Where<LogDto>(x => x.Header == type.ToString());
|
||||
.Where("(logHeader=@0)", type.ToString());
|
||||
|
||||
var translator = new SqlTranslator<IAuditItem>(sqlClause, query);
|
||||
var sql = translator.Translate();
|
||||
|
||||
|
||||
@@ -557,6 +557,16 @@ ORDER BY colName";
|
||||
}
|
||||
}
|
||||
|
||||
// If userlogin or the email has changed then need to reset security stamp
|
||||
if (changedCols.Contains("userLogin") || changedCols.Contains("userEmail"))
|
||||
{
|
||||
userDto.EmailConfirmedDate = null;
|
||||
userDto.SecurityStampToken = entity.SecurityStamp = Guid.NewGuid().ToString();
|
||||
|
||||
changedCols.Add("emailConfirmedDate");
|
||||
changedCols.Add("securityStampToken");
|
||||
}
|
||||
|
||||
//only update the changed cols
|
||||
if (changedCols.Count > 0)
|
||||
{
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
if (pageIndex < 0) throw new ArgumentOutOfRangeException(nameof(pageIndex));
|
||||
if (pageSize <= 0) throw new ArgumentOutOfRangeException(nameof(pageSize));
|
||||
|
||||
if (userId < 0)
|
||||
if (userId < Constants.Security.SuperUserId)
|
||||
{
|
||||
totalRecords = 0;
|
||||
return Enumerable.Empty<IAuditItem>();
|
||||
|
||||
@@ -421,6 +421,35 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Invalidate_SecurityStamp_On_Username_Change()
|
||||
{
|
||||
// Arrange
|
||||
var provider = TestObjects.GetScopeProvider(Logger);
|
||||
using (var scope = provider.CreateScope())
|
||||
{
|
||||
var repository = CreateRepository(provider);
|
||||
var userGroupRepository = CreateUserGroupRepository(provider);
|
||||
|
||||
var user = CreateAndCommitUserWithGroup(repository, userGroupRepository);
|
||||
var originalSecurityStamp = user.SecurityStamp;
|
||||
|
||||
// Ensure when user generated a security stamp is present
|
||||
Assert.That(user.SecurityStamp, Is.Not.Null);
|
||||
Assert.That(user.SecurityStamp, Is.Not.Empty);
|
||||
|
||||
// Update username
|
||||
user.Username = user.Username + "UPDATED";
|
||||
repository.Save(user);
|
||||
|
||||
// Get the user
|
||||
var updatedUser = repository.Get(user.Id);
|
||||
|
||||
// Ensure the Security Stamp is invalidated & no longer the same
|
||||
Assert.AreNotEqual(originalSecurityStamp, updatedUser.SecurityStamp);
|
||||
}
|
||||
}
|
||||
|
||||
private void AssertPropertyValues(IUser updatedItem, IUser originalUser)
|
||||
{
|
||||
Assert.That(updatedItem.Id, Is.EqualTo(originalUser.Id));
|
||||
|
||||
+3
-3
@@ -1109,9 +1109,9 @@
|
||||
"integrity": "sha512-kU/fHIGf2a4a3bH7E1tzALTHk+QfoUSCK9fEcMFisd6ZWvNDwPzXWAilItqOC3EDiAXPmGHaNc9/aXiD9xrAxQ=="
|
||||
},
|
||||
"angular-aria": {
|
||||
"version": "1.7.5",
|
||||
"resolved": "https://registry.npmjs.org/angular-aria/-/angular-aria-1.7.5.tgz",
|
||||
"integrity": "sha512-X2dGRw+PK7hrV7/X1Ns4e5P3KC/OBFi1l7z//D/v7zbZObsAx48qBoX7unsck+s4+mnO+ikNNkHG5N49VfAyRw=="
|
||||
"version": "1.7.9",
|
||||
"resolved": "https://registry.npmjs.org/angular-aria/-/angular-aria-1.7.9.tgz",
|
||||
"integrity": "sha512-luI3Jemd1AbOQW0krdzfEG3fM0IFtLY0bSSqIDEx3POE0XjKIC1MkrO8Csyq9PPgueLphyAPofzUwZ8YeZ88SA=="
|
||||
},
|
||||
"angular-chart.js": {
|
||||
"version": "1.1.1",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"ace-builds": "1.4.2",
|
||||
"angular": "1.7.9",
|
||||
"angular-animate": "1.7.5",
|
||||
"angular-aria": "1.7.5",
|
||||
"angular-aria": "1.7.9",
|
||||
"angular-chart.js": "^1.1.1",
|
||||
"angular-cookies": "1.7.5",
|
||||
"angular-dynamic-locale": "0.1.37",
|
||||
|
||||
@@ -169,6 +169,7 @@ When building a custom infinite editor view you can use the same components as a
|
||||
let editorsKeyboardShorcuts = [];
|
||||
var editors = [];
|
||||
var isEnabled = true;
|
||||
var lastElementInFocus = null;
|
||||
|
||||
|
||||
// events for backdrop
|
||||
@@ -261,6 +262,12 @@ When building a custom infinite editor view you can use the same components as a
|
||||
*/
|
||||
unbindKeyboardShortcuts();
|
||||
|
||||
// if this is the first editor layer, save the currently focused element
|
||||
// so we can re-apply focus to it once all the editor layers are closed
|
||||
if (editors.length === 0) {
|
||||
lastElementInFocus = document.activeElement;
|
||||
}
|
||||
|
||||
// set flag so we know when the editor is open in "infinite mode"
|
||||
editor.infiniteMode = true;
|
||||
|
||||
@@ -301,6 +308,10 @@ When building a custom infinite editor view you can use the same components as a
|
||||
$timeout(function() {
|
||||
// rebind keyboard shortcuts for the new editor in focus
|
||||
rebindKeyboardShortcuts();
|
||||
|
||||
if (editors.length === 0 && lastElementInFocus) {
|
||||
lastElementInFocus.focus();
|
||||
}
|
||||
}, 0);
|
||||
|
||||
}
|
||||
|
||||
@@ -4,16 +4,21 @@
|
||||
|
||||
.icon {
|
||||
position: absolute;
|
||||
padding: 5px 8px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 1px;
|
||||
padding: 0;
|
||||
pointer-events: none;
|
||||
top: 2px;
|
||||
color: @ui-action-discreet-type;
|
||||
transition: color .1s linear;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 0px;
|
||||
padding-left:24px;
|
||||
padding-left: 24px;
|
||||
margin-bottom: 0px;
|
||||
background-color: transparent;
|
||||
border-color: @ui-action-discreet-border;
|
||||
|
||||
@@ -41,13 +41,13 @@ ul.sections {
|
||||
|
||||
&:focus .section__name {
|
||||
.tabbing-active & {
|
||||
border: 1px solid;
|
||||
border-color: @gray-9;
|
||||
border: 1px solid @gray-9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section__name {
|
||||
border: 1px solid transparent;
|
||||
border-radius: 3px;
|
||||
margin-top: 1px;
|
||||
padding: 3px 10px 4px 10px;
|
||||
@@ -75,9 +75,9 @@ ul.sections {
|
||||
opacity: 0.6;
|
||||
transition: opacity .1s linear;
|
||||
}
|
||||
|
||||
|
||||
&:hover i {
|
||||
opacity:1;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div>
|
||||
<umb-load-indicator ng-if="isLoading"></umb-load-indicator>
|
||||
<div class="umb-rte" id="{{textAreaHtmlId}}" ng-style="{ visibility : isLoading ? 'hidden' : 'visible' }"></div>
|
||||
<div disable-hotkeys class="umb-rte" id="{{textAreaHtmlId}}" ng-style="{ visibility : isLoading ? 'hidden' : 'visible' }"></div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<ng-form class="umb-mini-search" ng-class="{'--has-value': vm.model !== null && vm.model !== ''}" novalidate>
|
||||
<i class="icon icon-search"></i>
|
||||
<i class="icon icon-search" aria-hidden="true"></i>
|
||||
<input
|
||||
class="form-control search-input"
|
||||
type="text"
|
||||
|
||||
Reference in New Issue
Block a user