I think the question is whether or not having the RestrictedAccess mixin implies to have
the Visible mixin. If that’s a yes, then inheritance should be used and the bug fixed or
workarounded.
Julien Viet
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Julien, All,
During the merging for this feature, some test failures occurred.
While debugging it, I've found out that on the mixin approach, the
following code renders to false, when it shouldn't:
adapter.isAdapted(Visible.class)
Changing it from Visible.class to RestrictAccess.class (which inherits
from Visible) makes the calling code to work. While this wouldn't be
such a big problem in GateIn itself, as there are only a couple of
places that makes such call, there's still a question on how this
could affect eXo or other Gatein-based products. As this is not part
of the public API, I don't think it would be a big problem, but it
would still be risky.
Another question is whether said code should render "true". My
understanding is that it should indeed render to true, which then
makes me wonder if there's something missing on the implementation or
if there's a bug down there (on isAdapted method, or at the JCR level).
If the current behavior of the Adapter code and JCR are indeed
correct, as well as the implementation (ie: isAdapted should render
"false"), then I'd say that it's better to go back to the previous
approach, having RestrictAccess independent from Visible. This way, we
don't affect current code that calls isAdapted(Visible.class).
Best,
Juca.
On 02/18/2014 10:58 AM, Juraci Paixão Kröhling wrote:
> All,
>
> We are planning on merging this feature by Monday next week, if
> there are no objections. So, please let me know if there's anything
> else that would need a change/improvement.
>
> Thanks! Juca.
>
> On 02/11/2014 04:40 PM, Juraci Paixão Kröhling wrote:
> > All,
>
>
> > I've done the proposed changes, and the squashed new branch is
> > available here:
> >
https://github.com/jpkrohling/gatein-portal/compare/BZ794359-HidePageIfPu...
> >
>
>
> > What I'm not sure, however, is whether I need to duplicate the
> > fields from Visible (will check the JCR spec in the meantime),
> > but it seems that's indeed a requirement, as I've seen it done
> > in another inherited type (though, it wasn't a mixin).
> >
>
>
> > I'm specially interested in comments about the code on
> > NavigationServiceImpl, RestrictAccess and gatein-nodetypes.xml,
> > but a review on the other parts would be just as awesome :-)
> >
>
>
> > Juca. _______________________________________________ gatein-dev
> > mailing list gatein-dev(a)lists.jboss.org (mailto:gatein-dev@lists.jboss.org)
> >
https://lists.jboss.org/mailman/listinfo/gatein-dev
> >
>
>
>
> _______________________________________________ gatein-dev mailing
> list gatein-dev(a)lists.jboss.org (mailto:gatein-dev@lists.jboss.org)
>
https://lists.jboss.org/mailman/listinfo/gatein-dev
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -
http://www.enigmail.net/
iQEcBAEBCgAGBQJTDeR8AAoJECKM1e+fkPrXNWcH/1ZUsQVrexcrWvm7KOkiYPrF
OU3nnS/d9c1KPC1/t3ZYG1OM0MuR7EprfBn50/oaex/6TptdAYSnCFXdxbytvilC
ZhutgsBeUkimWEDru3afxVniOFKmw1uHwLpka8wsiWFrgcj5J+dzOJN9MdgrYbom
fiVoj/c4bAt8PGdQWJo4SIP97ccYUuVdf8Ls4E6MyAu9UC5UGUZF2Z8sF8A6dcWR
1GGSRdZUvJfuEgvltERd9HWz9o2SuWpm1iQY+PDLloz1mpAYIhgreKushjXrjjWz
TrqyA0SqPyVyiqEPrZbYi7bdhfUz4z/YFBYZxaQnX/iRHQz+dWI6eolx5PPG7sE=
=wgXm
-----END PGP SIGNATURE-----