Merge branch 'v8/dev' into v8/contrib
This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
user-select: none;
|
||||
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.16);
|
||||
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.16);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user