|
Re: [CDO] Comparing Historical revisions: No Permission [message #1690846 is a reply to message #1690842] |
Tue, 31 March 2015 15:05 |
|
Hi Samuel,
I'm not 100% sure whether it's related to your problem but I seem to recall that SecurityManager plus a client with
multiple different views to the repository (as in auditing or branching) doesn't (and can't) work. The reason is that
the permission of an object is computed in the context of such a view but the result is stored in its revision. And that
is shared with other views (in which a different permission would have been applied). I thought we have a guard against
this, but I don't recall where it was. Perhaps I accidentally just excluded branching but permitted auditing...
If you really need this combination of functionality you may be successful by using different CDOSessions (with one view
each, then). But I'm not sure, so you will have to play a little bit. If it happens that you'd need new API on the
cdo.compare level please submit a bugzilla.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 31.03.2015 um 16:48 schrieb Samuel Leisering:
> Hi
> I have a question regarding the CDO-Compare API.
> I opened a CDO-Object in the History View of the eclipse Team-UI with the command:
> TeamUI.showHistoryFor(workbenchPage, cdoObject, CDOHistoryPageSource.INSTANCE);
>
> i tried to compare the commits that appear using the org.eclipse.emf.cdo.ui.compare plugin, and the context menu of
> the history view.
>
> I encountered the following problem: If i compare commits that happened before i started the current session, i get
> the following exception:
>
>
> org.eclipse.emf.cdo.common.security.NoPermissionException: No permission to access MyObject@OID69:0v10
> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.checkReadable(BaseCDORevision.java:1114)
> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.getValue(BaseCDORevision.java:854)
> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.get(BaseCDORevision.java:669)
> at org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisionDeltaImpl.compare(CDORevisionDeltaImpl.java:463)
> at org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisionDeltaImpl.<init>(CDORevisionDeltaImpl.java:119)
> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.compare(BaseCDORevision.java:602)
> at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.compare(BaseCDORevision.java:1)
> at org.eclipse.emf.cdo.common.revision.CDORevisionUtil.createChangeSetData(CDORevisionUtil.java:268)
> at org.eclipse.emf.cdo.common.revision.CDORevisionUtil.createChangeSetData(CDORevisionUtil.java:229)
> at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.compareRevisions(CDOSessionImpl.java:1142)
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView.compareRevisions(AbstractCDOView.java:1820)
> at org.eclipse.emf.cdo.compare.CDOComparisonScope$Minimal.getAffectedIDs(CDOComparisonScope.java:319)
> at org.eclipse.emf.cdo.compare.CDOComparisonScope$Minimal.create(CDOComparisonScope.java:287)
> at org.eclipse.emf.cdo.compare.CDOCompareUtil.compare(CDOCompareUtil.java:94)
> at org.eclipse.emf.cdo.ui.compare.CDOCompareEditorUtil.openDialog(CDOCompareEditorUtil.java:84)
> at org.eclipse.emf.cdo.ui.compare.CDOCompareEditorUtil.openDialog(CDOCompareEditorUtil.java:53)
> at org.eclipse.emf.cdo.ui.compare.CDOCompareEditorUtil.openDialog(CDOCompareEditorUtil.java:67)
> at org.eclipse.emf.cdo.ui.compare.CDOCompareEditorUtil.openDialog(CDOCompareEditorUtil.java:79)
> at
> org.eclipse.emf.cdo.ui.internal.compare.CompareWithPreviousVersionAction.run(CompareWithPreviousVersionAction.java:36)
> at org.eclipse.emf.cdo.ui.internal.compare.AbstractAction.run(AbstractAction.java:75)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:253)
> ...
>
>
> To clarify: I should have the permission to read the object, especially since i did the commits i wanted to compare
> myself.
>
> it works when i compare commits that happened while my session was already open.
>
> The CDO-Server runs with a SecurityManager, no branch support and of course audit support.
>
> Greetings,
> Samuel Leisering
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03941 seconds