[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1221: Can't edit the permissions on all the metadata at once

#1221: Can't edit the permissions on all the metadata at once
---------------------------------+------------------------------------------
Reporter: agueganno | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC2
Keywords: postgresql database |
---------------------------------+------------------------------------------
Hi,

We're using geonetwork version 2.8.0, last RC built from github sources.
We're based on f84cb00a0ffd5c59df2ab9996b4835250e6db9ab.

Description of the problem :

We are using the new UI rather than the "legacy" one.

We connect as an administrator. We select all the metadata records and do
"Other Actions" -> "Update Privileges". We then edit the permissions,
validate them... and nothing seems to be happening. If coming back to the
metadata records, we can't see them anymore : even while being an
administrator, we can't select a metadata record and view its content.

Reproducible : Yes, happens anytime we follow this procedure.

Additional information :

We are using PostgreSQL here rather than the default embedded H2. When
sending our request through the web UI, we can see a new query running in
the postgresql database cluster :

SELECT metadataId FROM OperationAllowed WHERE metadataId=$1 AND groupId=$2
AND operationId=$3

It does not seem to be able to end this query. I find the query itself
dubious, but I'm absolutely not a DB specialist. You'll probably be better
judges :wink:

I've not been able to test with other DBs - I just don't have the time for
that currently :-(. Consequently, I'm not able to say if it's postgresql
specific or not. I haven't look much in geonetwork/jeeves code bases
either.

From the log, I can't see much things... under certain conditions, I can
find a "Operation not allowed" error message, but not while logged as an
admin. The error is pasted in the end of the ticket.

If I select only the metadata records that are in the current page, I can
perform the edition without any problem. The bug seems to happen only when
I select all the records.

That's all I can say for now. If you need any other information, ask and
I'll try to provide them as soon as possible.

Best wishes,

Alexis.

<error id="operation-not-allowed">^M
   <message>Operation not allowed</message>^M
   <class>OperationNotAllowedEx</class>^M
   <stack>^M
     <at class="org.fao.geonet.lib.ResourceLib" file="ResourceLib.java"
line="131" method="checkPrivilege" />^M
     <at class="org.fao.geonet.services.metadata.View" file="View.java"
line="93" method="exec" />^M
     <at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="230" method="execService" />^M
     <at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="139" method="execServices" />^M
     <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="420" method="dispatch" />^M
     <at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="747" method="dispatch" />^M
     <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="208" method="execute" />^M
     <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="109" method="doGet" />^M
     <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="621" method="service" />^M
     <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="722" method="service" />^M
     <skip>...</skip>^M
     <at class="org.fao.geonet.monitor.webapp.WebappMetricsFilter"
file="WebappMetricsFilter.java" line="96" method="doFilter" />^M
     <skip>...</skip>^M
     <at
class="org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter"
file="MetricsRegistryInitializerFilter.java" line="31" method="doFilter"
/>^M
     <skip>...</skip>^M
   </stack>^M
   <request>^M
     <language>fre</language>^M
     <service>view</service>^M
   </request>^M
</error>

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1221&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1221: Can't edit the permissions on all the metadata at once
---------------------------------+------------------------------------------
Reporter: agueganno | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC2
Keywords: postgresql database |
---------------------------------+------------------------------------------

Comment(by simonp):

Can't reproduce this exactly Alexis -

- using postgresql
- approx 200 metadata records in db
- geonetwork 2.8.x

The operation actually works - BUT:

I do think the privileges screen (and it seems that all the batch ops
screens in the new interface are the same) should do the same as the
legacy batch ops screen whilst the operation is actually being executed
ie. it should show a busy cursor until the results of the op are returned.
Otherwise the user is likely to wonder whether they actually pressed the
'Submit' button etc

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1221#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.