Opened 17 years ago

Closed 17 years ago

#477 closed defect (fixed)

Creating a child item in the same transaction as the parent item gives a PermissionDeniedException

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: trivial Milestone: BASE 2.2
Component: core Version:
Keywords: Cc:

Description

For example:

Create a scan: scan = Scan.getNew()
Save it: DbControl.saveItem(scan)
Create an image: image = scan.newImage()
Save the image: DbControl.saveItem(image) <<-- PermissionDeniedException

Happens because the permission check in ChildItem class doesn't handle parent items that hasn't been committed to the database yet. A similiar check as in BasicItem.initPermissions needs to be performed in ChildItem.initPermissions

Change History (2)

comment:1 by Nicklas Nordborg, 17 years ago

Status: newassigned

comment:2 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [3073]) Fixes #477: Creating a child item in the same transaction as the parent item gives a PermissionDeniedException

Note: See TracTickets for help on using tickets.