Opened 9 years ago
Closed 9 years ago
#1962 closed defect (fixed)
Trying to load item with ID=1 as parent item when inheriting annotations
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | major | Milestone: | BASE 3.7 |
Component: | web | Version: | |
Keywords: | Cc: |
Description
As the root or admin user create two items, one being the parent of the other. For example one raw bioassay and one array design.
Create a user account and share the raw bioassay with write permission to that user but not the array design.
Log in as the other user and go to the edit dialog for the raw bioassay. The "Array design" field should be disabled and display 'denied'.
Switch to the "Annotations" tab and click on "Inherit". An error message is displayed:
Item not found: ArrayDesign[id=1]
The ID of the actual array design is NOT 1. The error message is a caused by the fact that when access is denied '-1' is used as the ID which is then passed on without the negative sign to the "Inherit" dialog which tries to load a non-existing item.
This issue is probably present in all places where annotations can be inherited.
Since negative values are also used for 'not modified', we can't use '-1' for 'denied' (there may be an item with ID=1!).
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [6999]) References #1962: Trying to load item with ID=1 as parent item when inheriting annotations
Seems like setting the value to "NaN" when permission is denied (and also for other non-selectable alternative) solves the problem.
Keeping this ticket open in case any side-effects are discovered.