Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Info

A

Wiki Markup
{rate} {info} A

step-by-step

guide

on

how

to

recreate

a

default

user

account

(superuser,

rebootstrapping

from

xml)

in

case

of

troubleshooting

can

be

found

at

[

Reset

superuser

account

]

page.

{info} If for some reason your anonymous user

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 :

Code Block
 files ;-)

h4. Anonymous user :
{code}
<%@ page contentType="text/plain" %>
<%@ page import="info.magnolia.importexport.BootstrapUtil"%>
<%@ page import="info.magnolia.context.MgnlContext"%>
<%@ page import="javax.jcr.ImportUUIDBehavior"%>
<%
  MgnlContext.setInstance(MgnlContext.getSystemContext());
  BootstrapUtil.bootstrap(new String[]{"/mgnl-bootstrap/core/users.system.anonymous.xml"}, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
  MgnlContext.getHierarchyManagergetJCRSession("users").save();
%>
Executed Successfully

Anonymous role :

Code Block
{code}
h4. Anonymous role :
{code}
<%@ page contentType="text/plain" %>
<%@ page import="info.magnolia.importexport.BootstrapUtil"%>
<%@ page import="info.magnolia.context.MgnlContext"%>
<%@ page import="javax.jcr.ImportUUIDBehavior"%>
<%
  MgnlContext.setInstance(MgnlContext.getSystemContext());

// on an author instance:
  BootstrapUtil.bootstrap(new String[]{"/path/to/userroles.anonymous.xml"}, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);

// on an public instance:
  BootstrapUtil.bootstrap(new String[]{"/path/to/public/userroles.anonymous.xml"}, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);


  MgnlContext.getHierarchyManagergetJCRSession("userroles").save();
%>
{code}