Bugfix: Variant permission languages needs a clear cache to work fully for current user (#12875)
* emit event when user group is saved
* clear current user cache when languages and user groups are saved
(cherry picked from commit 128dd42b47)
This commit is contained in:
committed by
Bjarke Berg
parent
e7d6b9ef7a
commit
b4f2de79b8
@@ -8,6 +8,14 @@ angular.module('umbraco.services')
|
||||
// this is used so that we know when to go and get the user's remaining seconds directly.
|
||||
var lastServerTimeoutSet = null;
|
||||
|
||||
eventsService.on("editors.languages.languageSaved", () => {
|
||||
service.refreshCurrentUser();
|
||||
});
|
||||
|
||||
eventsService.on("editors.userGroups.userGroupSaved", () => {
|
||||
service.refreshCurrentUser();
|
||||
});
|
||||
|
||||
function openLoginDialog(isTimedOut) {
|
||||
//broadcast a global event that the user is no longer logged in
|
||||
const args = { isTimedOut: isTimedOut };
|
||||
@@ -158,7 +166,7 @@ angular.module('umbraco.services')
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
const service = {
|
||||
|
||||
/** Internal method to display the login dialog */
|
||||
_showLoginDialog: function () {
|
||||
@@ -292,4 +300,6 @@ angular.module('umbraco.services')
|
||||
}
|
||||
};
|
||||
|
||||
return service;
|
||||
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function UserGroupEditController($scope, $location, $routeParams, userGroupsResource, localizationService, contentEditingHelper, editorService, overlayService) {
|
||||
function UserGroupEditController($scope, $location, $routeParams, userGroupsResource, localizationService, contentEditingHelper, editorService, overlayService, eventsService) {
|
||||
|
||||
var infiniteMode = $scope.model && $scope.model.infiniteMode;
|
||||
var id = infiniteMode ? $scope.model.id : $routeParams.id;
|
||||
@@ -107,6 +107,11 @@
|
||||
setSectionIcon(vm.userGroup.sections);
|
||||
makeBreadcrumbs();
|
||||
vm.page.saveButtonState = "success";
|
||||
|
||||
eventsService.emit("editors.userGroups.userGroupSaved", {
|
||||
userGroup: vm.userGroup,
|
||||
isNew: create
|
||||
});
|
||||
}
|
||||
}, function (err) {
|
||||
vm.page.saveButtonState = "error";
|
||||
|
||||
Reference in New Issue
Block a user