hi,
you can not change the workspace of a session at runtime. you can either
configure multiple workspace, or implement a service that acts as
factory for sessions and initializes them with the right workspace.
the recommended way (especially if the sites are not completely
separated but should share things) would be to use different root paths
based on the domain. that is, you can use one workspace but depending on
the tenant, you use different base paths for routing, content, menu and
so on. you can then easily have common areas that are accessible from
multiple sites.
however, as access control is not implemented with jackalope doctrine
dbal and can only be managed from a java client in jackrabbit, you would
need to be careful and might have an issue if you need to guarantee that
users can never see other sites.
hope that helps,
david
On 08.12.2015 14:30, Rafał Muszyński wrote:
> Hi guys,
>
>
> could you help me to understand if making the multitenancy based on
> PHPCR workspaces is possible to do without much hassle and would you be
> so kind to direct me where to start? in Symfony and Doctrine ORM I could
> use event listener and filters to make sure I set tenant id all the
> time. How about PHPCR ? I know there is this workspace setting in
> Doctrine PHPCR Bundle:
>
> *
> *
>
> *doctrine_phpcr:*
>
> **
>
> * session:*
>
> * workspace: default*
>
> *
> *
>
> I thought maybe it is possible somehow (how?) to set the diffrent
> workspace on runtime based on the current subdomain? and not using the
> default workspace.
>
>
> Best Regards
>
> --
> You received this message because you are subscribed to the Google
> Groups "PHPCR User Group Mailinglist" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
phpcr-users...@googlegroups.com
> <mailto:
phpcr-users...@googlegroups.com>.
> To post to this group, send email to
phpcr...@googlegroups.com
> <mailto:
phpcr...@googlegroups.com>.
> Visit this group at
http://groups.google.com/group/phpcr-users.
> For more options, visit
https://groups.google.com/d/optout.
--
Liip AG // Agile Web Development // T
+41 43 500 39 80
CH-8005 Zurich // PGP 0xA581808B //
www.liip.ch