[opencms-dev] Re: createResource does not work in online modus

Armen Markarian markarian at inexweb.de
Wed May 26 13:20:01 CEST 2004


Hi Steffen, 

The reason therefo is because in the online proejct the guest user is on
work and this user has no rights to create resources ...
You can solve this Problem with an workaround: create a user e.g.
myhiddenwebuser and define him as Projectmanager and do login this user
before you start the create action

CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
CmsObject cmsObj = cms.getCmsObject();
String current_username = cms.user("name");
if(current_username!=null && current_username.equalsIgnoreCase("guest"))
{
  cmsObj.loginUser(myhiddenwebuser,"password of this user");
}

Regards

Armen




More information about the opencms-dev mailing list