You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Deparvu (JIRA)" <ji...@apache.org> on 2018/09/27 10:10:00 UTC

[jira] [Resolved] (OAK-7782) Clarify error on aggregate privilege registration with non existing privileges

     [ https://issues.apache.org/jira/browse/OAK-7782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Deparvu resolved OAK-7782.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 1.9.9
                   1.10

http://svn.apache.org/viewvc?rev=1842080&view=rev

> Clarify error on aggregate privilege registration with non existing privileges
> ------------------------------------------------------------------------------
>
>                 Key: OAK-7782
>                 URL: https://issues.apache.org/jira/browse/OAK-7782
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, security
>            Reporter: Alex Deparvu
>            Assignee: Alex Deparvu
>            Priority: Trivial
>             Fix For: 1.10, 1.9.9
>
>
> Trying to register an aggregate privilege based on non existing privileges fails with a pretty cryptic error [0]. To clarify, the non existing ones are filtered out of the set, but if nothing remains (none of the provided ones actually exists), this error happens.
> I would like to clarify the expected behavior by wrapping it in a proper RepositoryException. This will not change the behavior, only the message and the error type.
> [0]
> {noformat}
> javax.jcr.nodetype.ConstraintViolationException: OakConstraint0048: PrivilegeBits are missing.
>     at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:226)
>     at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:213)
>     at org.apache.jackrabbit.oak.security.privilege.PrivilegeDefinitionWriter.writeDefinitions(PrivilegeDefinitionWriter.java:122)
>     at org.apache.jackrabbit.oak.security.privilege.PrivilegeDefinitionWriter.writeDefinition(PrivilegeDefinitionWriter.java:69)
>     at org.apache.jackrabbit.oak.security.privilege.PrivilegeManagerImpl.registerPrivilege(PrivilegeManagerImpl.java:86)
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0048: PrivilegeBits are missing.
>     at org.apache.jackrabbit.oak.security.privilege.PrivilegeValidator.validateDefinition(PrivilegeValidator.java:161)
>     at org.apache.jackrabbit.oak.security.privilege.PrivilegeValidator.childNodeAdded(PrivilegeValidator.java:99)
>     at org.apache.jackrabbit.oak.security.privilege.PrivilegeValidator.childNodeAdded(PrivilegeValidator.java:1)
>     at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.childNodeAdded(CompositeEditor.java:107)
>     at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:115)
>     at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeState.compareAgainstBaseState(MemoryNodeState.java:168)
>     at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147)
>     at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeState.compareAgainstBaseState(MemoryNodeState.java:161)
>     at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147)
>     at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState$2.childNodeChanged(ModifiedNodeState.java:446)
>     at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeState.compareAgainstBaseState(MemoryNodeState.java:161)
>     at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:421)
>     at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:51)
>     at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)
>     at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60)
>     at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore$MemoryNodeStoreBranch.merge(MemoryNodeStore.java:294)
>     at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore.merge(MemoryNodeStore.java:133)
>     at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:250)
>     at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:261)
>     at org.apache.jackrabbit.oak.security.privilege.PrivilegeDefinitionWriter.writeDefinitions(PrivilegeDefinitionWriter.java:119)
>     ... 28 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)