Conflict detection fails for non-admin users

Steps to reproduce

Steps to reproduce:
1. Create 2 users, user1 and user2. Create a group with all ROLE_UI permissions and a ROLE_CAPTURE_AGENT_* permission so that both users can schedule events, with both user1 and user2 as members.
2. Login as user1, schedule an event, default ACL so only user1 has
read/write permissions in the ACL.
3. Login as user2, attempt to schedule an event at the same time.
4. Login as admin, attempt the same operation.

Actual Results:

When scheduling as user2, the conflict check fails with associated errors logs in the opencast.log file. A non-specific error is shown to the user at the very end of the process ("Cannot create event").

As admin, a conflict error and details are shown immediately.

Expected Results:

Conflict details should be shown as for admin.

Workaround (if any):



Stephen Marquard
December 7, 2019, 6:03 PM

Open PR for this is


Stephen Marquard
September 25, 2019, 10:01 AM

Started looking at this a while ago but not tested.

Stephen Marquard
September 25, 2019, 10:01 AM
Stephen Marquard
April 30, 2019, 7:12 AM

I believe this is basically a permissions issue: the schedule code finds the conflict, but is unable to get details of the conflicting event because the user for whom the conflict check is being performed does not have access to read the conflicting event.

On the client side, the request gets a 500 internal service error:

Request URL:
Request Method: POST
Status Code: 500

Stephen Marquard
April 30, 2019, 7:09 AM

2019-04-30T09:00:56,728 | ERROR | (AbstractEventEndpoint:1985) - Unable to find conflicting events for NC_HQ, 2019-04-30T08:00:00Z, 2019-04-30T08:55:00Z
org.opencastproject.scheduler.api.SchedulerException: org.opencastproject.scheduler.impl.RuntimeNotFoundException
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.findConflictingEvents( ~[?:?]
at org.opencastproject.adminui.endpoint.AbstractEventEndpoint.getNewConflicts( [40:opencast-admin-ui:8.0.0.SNAPSHOT]

Caused by: org.opencastproject.scheduler.impl.RuntimeNotFoundException
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.getEventMediaPackage( ~[?:?]
at$3$1.accept( ~[?:?]
at java.util.Vector$VectorSpliterator.forEachRemaining( ~[?:?]
at ~[?:?]
at ~[?:?]
at$ReduceTask.doLeaf( ~[?:?]
at$ReduceTask.doLeaf( ~[?:?]
at ~[?:?]
at java.util.concurrent.CountedCompleter.exec( ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec( ~[?:?]
at java.util.concurrent.ForkJoinTask.doInvoke( ~[?:?]
at java.util.concurrent.ForkJoinTask.invoke( ~[?:?]
at$ReduceOp.evaluateParallel( ~[?:?]
at ~[?:?]
at ~[?:?]
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.findConflictingEvents( ~[?:?]

Fixed and reviewed
Your pinned fields
Click on the next to a field label to start pinning.




Stephen Marquard


Incorrectly Functioning Without Workaround