A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hi,
I based the following on the post here, it should reset the views for all users:
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="EPiServer.ServiceLocation" %>
<%@ Import Namespace="EPiServer.Security" %>
<%@ Import Namespace="EPiServer.Shell.Security" %>
<%@ Import Namespace="EPiServer.Shell.ViewComposition" %>
<%
var userProvider = ServiceLocator.Current.GetInstance<UIUserProvider>();
var repository = ServiceLocator.Current.GetInstance<IPersonalizedViewSettingsRepository>();
var userImpersonation = ServiceLocator.Current.GetInstance<IUserImpersonation>();
int totalRecords;
foreach (var user in userProvider.GetAllUsers(0, 1000, out totalRecords))
{
var principal = userImpersonation.CreatePrincipal(user.Username);
var settings = repository.Load(principal);
foreach (var setting in settings)
{
repository.Delete(principal, setting.ViewName);
Response.Write(string.Format("View {0} reset for user: {1}", setting.ViewName, user.Username));
}
}
%>
Reliability is another matter
, but seemed to work in a single test I did!
Hi,
We recently upgraded from 8.11 to 10.10 but the menus (and gadgets) either don't display or display incorrectly after the upgrade.
I found discussion on the forum about this and how reseting the views fixed the issue but was wondering if there was a reliable automated way to fix this for all editors.
Thanks,