You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

If for some reason your anonymous user can't be loaded anymore, this script should help, if applied as per Executing fix scripts. Recreating the superuser is very similar, just get the correct bootstrap files (wink)

Anonymous user :

<%@ page contentType="text/plain" %>
<%@ page import="info.magnolia.cms.module.ModuleUtil"%>
<%@ page import="javax.jcr.ImportUUIDBehavior"%>
<%
  ModuleUtil.bootstrap(new String[]{"/mgnl-bootstrap/core/users.system.anonymous.xml"}, true, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
%>

Anonymous role :

<%@ page contentType="text/plain" %>
<%@ page import="info.magnolia.cms.module.ModuleUtil"%>
<%@ page import="javax.jcr.ImportUUIDBehavior"%>
<%
// on an author instance:
  ModuleUtil.bootstrap(new String[]{"/mgnl-bootstrap/core/userroles.anonymous.xml"}, true, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);

// on an public instance:
  ModuleUtil.bootstrap(new String[]{"/mgnl-bootstrap/core/public/userroles.anonymous.xml"}, true, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
%>
  • No labels