[
https://issues.apache.org/jira/browse/OAK-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828608#comment-13828608
]
Antonio Sanso commented on OAK-1205:
------------------------------------
@anchela fairly enough there is not a "grand plan" behind this proposal . i
would say is more about consistency...
As said with the other constructor
{code}
public ImmutableRoot(@Nonnull NodeState rootState) {
{code}
it is possible to pass a SecureNodeState as already attempted in oe patch for
OAK-1130
{code}
+ Context c =
securityProvider.getConfiguration(AuthorizationConfiguration.class).getContext();
+ PermissionProvider pp = permissionProvider.get();
+ SecureNodeState s = new SecureNodeState(rootState, pp, c);
+ ImmutableTree t = new ImmutableTree(s);
{code}
So I think the
{code}
public ImmutableRoot(@Nonnull Root root, @Nonnull TreeTypeProvider
typeProvider) {
{code}
constructor should also provide this option.
But this is just my 0.02 $ :)
> Enable/Disable security for ImmutableRoot built from a Root
> -----------------------------------------------------------
>
> Key: OAK-1205
> URL: https://issues.apache.org/jira/browse/OAK-1205
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: Antonio Sanso
> Priority: Minor
> Attachments: OAK1205-patch.txt
>
>
> At the moment when invoking the
> {code}
> public ImmutableRoot(@Nonnull Root root, @Nonnull TreeTypeProvider
> typeProvider) {
> {code}
> constructor there is no way to specify if to specify if the SecureNodeState
> should be use or not.
> Indeed with the current implementation this is always disabled. It would be
> nice to have the explicit choice to have a SecureNodeState or not, e.g. having
> {code}
> public ImmutableRoot(@Nonnull Root root, @Nonnull TreeTypeProvider
> typeProvider, boolean secured) {
> {code}
> I have discussed this with [~mduerig] and we came up with the patch I will
> provide.
--
This message was sent by Atlassian JIRA
(v6.1#6144)