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):

None

Activity

Show:
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(SchedulerServiceImpl.java:1086) ~[?:?]
at org.opencastproject.adminui.endpoint.AbstractEventEndpoint.getNewConflicts(AbstractEventEndpoint.java:1976) [40:opencast-admin-ui:8.0.0.SNAPSHOT]

Caused by: org.opencastproject.scheduler.impl.RuntimeNotFoundException
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.getEventMediaPackage(SchedulerServiceImpl.java:1497) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:?]
at java.util.Vector$VectorSpliterator.forEachRemaining(Vector.java:1440) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:?]
at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747) ~[?:?]
at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721) ~[?:?]
at java.util.stream.AbstractTask.compute(AbstractTask.java:316) ~[?:?]
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:?]
at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401) ~[?:?]
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:714) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:?]
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.findConflictingEvents(SchedulerServiceImpl.java:1084) ~[?:?]

Stephen Marquard
April 30, 2019, 7:12 AM
Edited

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: https://develop.opencast.org/admin-ng/event/new/conflicts
Request Method: POST
Status Code: 500

Stephen Marquard
September 25, 2019, 10:01 AM
Stephen Marquard
September 25, 2019, 10:01 AM

Started looking at this a while ago but not tested.

Stephen Marquard
December 7, 2019, 6:03 PM

Open PR for this is

 

Fixed and reviewed

Assignee

Unassigned

Reporter

Stephen Marquard

Severity

Incorrectly Functioning Without Workaround

Tags (folksonomy)

None

Components

Affects versions

Priority

Major
Configure