[opencms-dev] switching between Online and Offline project for a logged in user

Antonio Cordeddu antoniocordeddu at coranto.it
Mon Apr 27 16:00:45 CEST 2015


Hi Christoph,

give a look at the class org.opencms.jsp.CmsJspLoginBean, you can use 
the method login(java.lang.String userName,  java.lang.String password,  
java.lang.String projectName) to switch toward a project after login.

You can also use the method |*setCurrentProject 
<http://documentation.opencms.org/javadoc/core/org/opencms/file/CmsRequestContext.html#setCurrentProject%28org.opencms.file.CmsProject%29>*(CmsProject 
<http://documentation.opencms.org/javadoc/core/org/opencms/file/CmsProject.html> project) 
to set the current project for the user||.|

I hope these tips are useful in your scenario.

Kind regards
Antonio Cordeddu


On 27/04/2015 11:05, Christoph Kukulies wrote:
> I need to switch between the Online resp. Offline view for users who 
> log into my site.
> "normal" Webusers should be directed to the "Online" project, Admin 
> and editors should go to the
> Offline project in Direct Edit mode.
>
> How could I achieve this?
>


-- 
_______________________________________________
Coranto informatica di Antonio Cordeddu
Via Torricelli, 9 09047 Selargius (CA) - Italy
antoniocordeddu at coranto.it
http://www.coranto.it
_______________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150427/fe96a724/attachment.htm>


More information about the opencms-dev mailing list