Opened 5 years ago

Closed 5 years ago

#2184 closed defect (fixed)

Marking a job as ended fails with PermissionDeniedException

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 3.15.1
Component: core Version:
Keywords: Cc:

Description

There seems to be some kind of permission problems when a job is being ended by a user that is not the owner of the job doesn't have permission to access the owner information.

The stack trace is:

net.sf.basedb.core.PermissionDeniedException: Permission denied: Not allowed to read User[id=1; name=Server root administrator]
	at net.sf.basedb.core.BasicItem.checkPermission(BasicItem.java:113)
	at net.sf.basedb.core.DbControl.getItem(DbControl.java:1001)
	at net.sf.basedb.core.OwnedItem.getOwner(OwnedItem.java:63)
	at net.sf.basedb.core.Job.sendMessage(Job.java:1853)
	at net.sf.basedb.core.Job.doneOk(Job.java:1244)
	at net.sf.basedb.core.Job.doneOk(Job.java:1218)
	at net.sf.basedb.reggie.servlet.SequencingRunServlet.doPost(SequencingRunServlet.java:585)
...

This is from the Reggie sequencing pipeline. One user has registered a job the keeps track of the sequencing progress. Another user is then registering the sequencing as ended. This fails with the above stack trace.

It seems to almost work, except that BASE internally tries to create a new Message item to the user that "owns" the sequencing job. This fails since the other user doesn't have permission to read the user information. Since the message sending is purely internal functionality of BASE this should work as long as the user has permissions to register the job as ended (which is the case here).

Change History (1)

comment:1 by Nicklas Nordborg, 5 years ago

Resolution: fixed
Status: newclosed

In 7725:

Fixes #2184: Marking a job as ended fails with PermissionDeniedException

The internal code should now work with data-layer objects directly to avoid permission problems.

Note: See TracTickets for help on using tickets.