https://jira.duraspace.org/browse/DS-2587

2015-05-21 12:26 GMT+02:00 Ondřej Košarko <[email protected]>:

> Hi all,
>
> We did an upgrade from 1.8 to 5_x and there is a trouble with the
> resourcepolicy table.
>
> When an item is withdrawn
>
> AuthorizeManager.removeAllPoliciesByDSOAndTypeNotEqualsTo(ourContext,
> this, ResourcePolicy.TYPE_CUSTOM);
>
> gets called, meaning the following sql gets executed
>
> DatabaseManager.updateQuery(c, "DELETE FROM resourcepolicy WHERE "
>                 + "resource_type_id= ? AND resource_id= ? AND rptype <> ?
> ",
>                 o.getType(), o.getID(), type);
>
>
> But since there was no rptype in 1.8, and the upgrade process does not add
> any, the column is null and nothing is deleted, because <> doesnt compare
> against null values.
>
> This actually means if there was an anonymous read on an item, the item is
> still visible after being withdrawn...
>
> I'll be filling that as a bug, but the question is what is the cleanest
> solution?
> a) adding some type
> b) modifying the query with something like "...AND (rptype <> ? or rptype
> is null)"
> c) ?
>
> Regards,
> OK
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to