[opencms-dev] running code as Admin

Ørnulf Risnes ornulf.risnes at nsd.uib.no
Tue Feb 24 09:54:02 CET 2004


Ok, the method in question is CmsRequestContext::setCurrentProject(int)

You can obtain the different project ids by traversing the vector 
returned by CmsObject::getAllAccessibleProjects()


Ørnulf Risnes
Nesstar ltd.


Michael Goodwin wrote:

> 
> 
> 
> Thanks, I shall give that a go.
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> _______________________________________________
> 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