[opencms-dev] running code as Admin

Ørnulf Risnes ornulf.risnes at nsd.uib.no
Mon Feb 23 21:16:01 CET 2004


Michael Goodwin wrote:
> 
> 
> 
> Could someone tell me if it is possible in some jsp code to get another
> cmsobject, which has better access rights? Would this need a password?
> It would still be secure if the code could inherit the rights of its owner
> and not the executer.
> 
> Furthermore, can anyone explain how it could be possible for
> cmsobject.accessWrite() to return false, on a file when permissions are
> granted for all?

I struggled with this too, and it turned out that I tried to gain 
write-access on the online-project which always fails. Switch to the 
appropriate offline-project using the CmsRequestContext (I think, 
haven't got the API-docs with me). When you have performed write you 
switch to back to the online-project again within the very same 
template. Hope this helps.

Ørnulf Risnes
Nesstar ltd.


> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list