[GeoNetwork-devel] Unable to import metadata (mef) file as editor

Using Geonetwork 2.10.0 - I'm unable to import metadata (mef) from the
administrator interface when logged in as an "editor". Seems to work fine
using the "admin" account.

I'm presented with the form to upload the MEF file but when I click submit
to upload the file it prompts me for my credentials again and then I get the
error

       Metadata is not valid.

       MissingParameterEx : mefFile

I'm assuming the error is related to the login form which probably lost the
file being uploaded. Why is it asking me to login? - I'm already an editor
and should have the required privileges.

When I look at the logs it seems like the file upload is being performed by
another anonymous session without the proper roles.

Any idea on what could be causing this?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Unable-to-import-metadata-mef-file-as-editor-tp5062417.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi Ian,

2013/6/26 ianwallen <ianwallen@anonymised.com>:

Using Geonetwork 2.10.0 - I'm unable to import metadata (mef) from the
administrator interface when logged in as an "editor". Seems to work fine
using the "admin" account.

I'm presented with the form to upload the MEF file but when I click submit
to upload the file it prompts me for my credentials again and then I get the
error

       Metadata is not valid.

       MissingParameterEx : mefFile

I'm assuming the error is related to the login form which probably lost the
file being uploaded. Why is it asking me to login? - I'm already an editor
and should have the required privileges.

It looks to be related to a MEF containing info.xml which set
privileges for groups that the editor can't set (eg. set a record
public). This trigger the SNA exception:
https://github.com/geonetwork/core-geonetwork/blob/develop/web/src/main/java/org/fao/geonet/kernel/DataManager.java#L2364
I'm not sure why the exception trigger the sign out and the best way
to fix that. Maybe skip setting privileges for groups the user is not
allowed to.

Cheers.

Francois

When I look at the logs it seems like the file upload is being performed by
another anonymous session without the proper roles.

Any idea on what could be causing this?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Unable-to-import-metadata-mef-file-as-editor-tp5062417.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Francois,

Some of the data is public as you mentioned so I think you are right about
this issues. I will need to do some more testing with non-public data to see
if it is possible.

As for how to fix this. I think this could be done as part of the improved
workflow <http://trac.osgeo.org/geonetwork/wiki/ImprovedWorkflow&gt; . A
batch metadata insert would be the same as if the user edited and saved each
record manually. In this case if the user is an editor, when they save a
previously public records, it would be saved as draft until the reviewer
approved the changes. To bad this has not been implemented yet

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Unable-to-import-metadata-mef-file-as-editor-tp5062417p5062453.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

I just did another test where I did the following.

As Editor I created a new metadata record.
I then set the publish permissions to the proper groups - ie "sample group"
Now I log out and login as administrator.
Then as the administrator I changed the privs on this metadata record so
that it is published to all.
Now I log out and login as the editor.
Now If I try to edit the permissions again the "published to all" is greyed
out which is ok.
But if I submit (even if I don't change any of the permissions)- it logs me
out... It does not prompt for any credential - it just logs me out....

Here are the logs from the submit....

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Unable-to-import-metadata-mef-file-as-editor-tp5062417p5063842.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.