<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=311502713-19102006><FONT face=Arial
color=#0000ff size=2>If your module registers a class implementing
I_CmsModuleAction in opencms-modules.xml, then that class will get instantiated
and called on module initialisation time (e.g. at system start-up).
Various methods defined in the interface include as a parameter an instance of
CmsObject, and I believe the OpenCms runtime calls these methods (at start-up)
using a CmsObject which has administrative rights. In your module's
implementation of I_CmsModuleAction, you can store a reference to this CmsObject
to be used later. It doesn't feel like a neat solution, but I believe
people have used it successfully.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=311502713-19102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=311502713-19102006><FONT face=Arial
color=#0000ff size=2>There's been discussion on this subject on this list in the
past year - you might be able to find something else by searching e.g. at <A
href="http://www.nabble.com/OpenCMS---Dev-f654.html">http://www.nabble.com/OpenCMS---Dev-f654.html</A>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=311502713-19102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=311502713-19102006><FONT face=Arial
color=#0000ff size=2>Jon</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Andy
Bicksbo<BR><B>Sent:</B> 19 October 2006 13:57<BR><B>To:</B> The OpenCms mailing
list<BR><B>Subject:</B> [opencms-dev] Switching the user of
cmsObject/Safety<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Hi</DIV>
<DIV> </DIV>
<DIV>I worked on this the last days and i didn't find a possibility the get a
readble password out of an user. The Password is decoded into md5, i
think, and as far as i k´know, there isn't any possibility the retrieve a
md5 into human readable coding and there's nothing, where opencms retrieves a
password. I'm working currently on a component for opencms, where i need to
build a cmsobject with a user with admin rights, but i don't want to write a
user with it'S password into sourcecode( cmsObject.loginuser(String username,
String password)) nor to change the permissions of every file i have to alter
before doing stuff with it and afterwards. (The user, who should initiate this
component has no adminrights, so i have to switch the user of cmsObject) </DIV>
<DIV> </DIV>
<DIV>At topic:<BR>But you can directly alter passwords in the db opencms
uses(CMS_USER)</DIV>
<DIV>At this point, i think it#s not very save, that the db connection stuff is
written readable in the opencms.properties file</DIV>
<DIV> </DIV>
<DIV>Does anybody know a solution?<BR> </DIV>
<DIV>Thanks for listening<BR>Andy</DIV></BODY></HTML>