Re: vaughn vernon - implementing domain-driven design - ch 2
"patrykzielu" <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Hi Tom, First of all I don't know if you have sample project base on book? It is shared on git: https://github.com/VaughnVernon/IDDD_Samples What I understand is that in Collaboration Context Author need to have this permission to be created. There is context integration: CC(Collaboration Context) to AIC(AccessIdentity Context). When creating Forum only author has that kind of permission so when it is created by integration service CollaboratorService.authorFrom(Tenant aTenant, String anIdentity) there is checking if this User has this permission in AIC. I hope I understand your question, and I anser it correctly. --- In [email protected], Tom Eugelink <tbee@...> wrote: > > > Does anyone know if there is a forum to discuss Vaughn's book? > > I've just finished chapter 2 with a lingering question. I understand the example where User and Permission are not correct within the Collaboration Context, and that Author is more appropriate, moving User out to a separate Security Context. What I'm missing is how in the improved example the permission check is done. I can't find a call out to the Security Context checking if the User associated with the Author has permission to start a discussion. Should I assume that there is some kind of container checking this (just like the @Transactional is handled by a container)? I would be greatly against that, because that would bind a behavior aspect onto an (somewhat hidden) implementation; I'd rather have an explicit mention of the required permission behavior on Forum, or at least an expli cit annotation @RequiresStartDiscussionPermission or something. > > Furthermore, the permission to start a discussion seems like a cross cutting problem; either the Collaboration Context knows about security, or the Security Context knows about forums and discussions. > > Thanks! > > Tom > ------------------------------------