Merge remote-tracking branch 'origin/v8/dev' into netcore/dev

# Conflicts:
#	src/Umbraco.Core/Services/UserServiceExtensions.cs
#	src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.Infrastructure/Search/ExamineComposer.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/DatabaseDataSource.cs
#	src/Umbraco.Tests/UmbracoExamine/IndexInitializer.cs
This commit is contained in:
Bjarke Berg
2020-04-24 08:33:17 +02:00
15 changed files with 254 additions and 78 deletions

View File

@@ -1,7 +1,7 @@
/** Used to broadcast and listen for global events and allow the ability to add async listeners to the callbacks */
/*
Core app events:
Core app events:
app.ready
app.authenticated
@@ -12,9 +12,9 @@
*/
function eventsService($q, $rootScope) {
return {
/** raise an event with a given name */
emit: function (name, args) {

View File

@@ -185,7 +185,19 @@ angular.module('umbraco.services')
authenticate: function (login, password) {
return authResource.performLogin(login, password)
.then(this.setAuthenticationSuccessful);
.then(function(data) {
// Check if user has a start node set.
if(data.startContentIds.length === 0 && data.startMediaIds.length === 0){
var errorMsg = "User has no start-nodes";
var result = { errorMsg: errorMsg, user: data, authenticated: false, lastUserId: lastUserId, loginType: "credentials" };
eventsService.emit("app.notAuthenticated", result);
throw result;
}
return data;
}).then(this.setAuthenticationSuccessful);
},
setAuthenticationSuccessful: function (data) {

View File

@@ -72,6 +72,7 @@ function MainController($scope, $location, appState, treeService, notificationsS
$scope.authenticated = null;
$scope.user = null;
const isTimedOut = data && data.isTimedOut ? true : false;
$scope.showLoginScreen(isTimedOut);
// Remove the localstorage items for tours shown