[GeoNetwork-devel] Massive Delete failed

Hi

When attempting to perform a massive delete I get the following.

All records failed with the following.
"Metadata Records that could not be deleted because you are not the owner"

If I attempt to delete each record individually they are removed
successfully. But this is time consuming.

I checked the metadata tables for these records and found that the
groupowner field is assigned to a group that the user does not have access
to. But I am assigned content reviewer for the group in which the metadata
records belong to.

If I change the groupowner to be the same as the group for which I'm the
content reviewer then the delete works successfully.

1 - Why is the individual delete working but not the massive delete? Is this
a bug?
2 - The only way I know how to change the groupowner field for these records
is directly via sql commands on the database. Is it possible to change the
groupowner field via the interface? I thought the groupowner was
depreciated?

Using geonetwork 2.10.3

Thank you

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Massive-Delete-failed-tp5137511.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi,

···

2014-04-28 13:51 GMT+02:00 ianwallen <ianwallen@anonymised.com>:

Hi

When attempting to perform a massive delete I get the following.

All records failed with the following.
“Metadata Records that could not be deleted because you are not the owner”

If I attempt to delete each record individually they are removed
successfully. But this is time consuming.

I checked the metadata tables for these records and found that the
groupowner field is assigned to a group that the user does not have access
to. But I am assigned content reviewer for the group in which the metadata
records belong to.

If I change the groupowner to be the same as the group for which I’m the
content reviewer then the delete works successfully.

1 - Why is the individual delete working but not the massive delete? Is this
a bug?

Looks like a bug to me.
Delete check canEdit https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/Delete.java#L77 and batch delete check isOwner
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/BatchDelete.java#L92

Others ?

2 - The only way I know how to change the groupowner field for these records
is directly via sql commands on the database. Is it possible to change the
groupowner field via the interface? I thought the groupowner was
depreciated?

The groupOwner can only be changed by transfer privileges I think in 2.10.x. I added the capability to update the groupOwner in the editor in develop branch.

Cheers.

Francois

I have open an issue on github
Metadata massive delete fails for content reviewers/editors #486
<https://github.com/geonetwork/core-geonetwork/issues/486&gt;

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Massive-Delete-failed-tp5137511p5137763.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.