[opencms-dev] running code as Admin
Michael Goodwin
mgoodwin at amadeus.net
Tue Feb 24 17:41:01 CET 2004
Infact, this didn't work. How frustrating. Thanks for the tip.
When I call writeAccess, it says true, yet I traced the exception to the
CmsResourceBroker and it throws an exception because the same writeAccess
function returns false! (Note the modified exception message, with the
user, project and file)
Here is my simplified code and the output.
http://dev.pro.amadeus.net/stuff/writefile/testsecurity2.jsp
http://dev.pro.amadeus.net/stuff/writefile/output.html
Thanks for any help .
From: Ørnulf Risnes <ornulf.risnes at nsd.uib.no>@opencms.org on 23/02/2004
21:15
Please respond to opencms-dev at opencms.org
Sent by: opencms-dev-admin at opencms.org
To: opencms-dev at opencms.org
cc:
Subjec Re: [opencms-dev] running code as
t: Admin
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
_______________________________________________
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