[opencms-dev] Chrooting a user

Christian Steinert christian_steinert at web.de
Fri Jun 16 17:31:57 CEST 2006


Sami Honkonen schrieb:
> Is it possible to restrict a user to a certain directory?
>
> So far I've managed by setting the user and project manager group of the
> Offline-project to Administrators and then adding a new project and
> group for every restricted area. However with this approach the users
> can see the offline content in other areas even though they can't edit
> it and I want to prevent that.
>
>   
You have to be very careful, when making your users into the root users. 
They might call the workplace or whatever unless your use of this 
technique is very limited.

But you can also log somebody into the online project. The current 
Project can be set with:
    
cmsJspActionElement.getCmsObject().getRequestContext.setCurrentProject( 
... )

there is also a method that will give you all accessible projects for 
the current user, I think it is
    
cmsJspActionElement.getCmsObject().getRequestContext.getAllAccessibleProjects()

But be really careful with granting admin access to visitors!

hth christian



More information about the opencms-dev mailing list