[GeoNetwork-users] user.update : unknown profile error

Hi all,

I want to add a user via the 'user.update' service with the profile 'Registered User'. It looks like the profile is not valid. The same request with the profile 'Editor' works fine. Is this a bug in geonetwork? I'm using version 2.6.4.
Regards
Bart

request:
curl -b cookie.txt -XPOST -H 'Content-type: application/xml' -d '<?xml version="1.0" encoding="UTF-8"?><request><operation>newuser</operation><username>plus</username><password>plus</password><profile>Registered User</profile><groups>2</groups><groups>3</groups></request>' ${gn_url}/geonetwork/srv/en/user.update;

response:
<?xml version="1.0" encoding="UTF-8"?>
<error id="error">
  <message>Unknown profile : Registered User</message>
  <class>Exception</class>
  <stack>
    <at class="org.fao.geonet.services.user.Update" file="Update.java" line="86" method="exec" />
    <at class="jeeves.server.dispatchers.ServiceInfo" file="ServiceInfo.java" line="238" method="execService" />
    <at class="jeeves.server.dispatchers.ServiceInfo" file="ServiceInfo.java" line="141" method="execServices" />
    <at class="jeeves.server.dispatchers.ServiceManager" file="ServiceManager.java" line="399" method="dispatch" />
    <at class="jeeves.server.JeevesEngine" file="JeevesEngine.java" line="670" method="dispatch" />
    <at class="jeeves.server.sources.http.JeevesServlet" file="JeevesServlet.java" line="185" method="execute" />
    <at class="jeeves.server.sources.http.JeevesServlet" file="JeevesServlet.java" line="108" method="doPost" />
    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="727" method="service" />
    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="820" method="service" />
    <at class="org.mortbay.jetty.servlet.ServletHolder" file="ServletHolder.java" line="502" method="handle" />
  </stack>
  <request>
    <language>en</language>
    <service>user.update</service>
  </request>
</error>

Uniting expertise from different fields of technology enhances the development of innovative methods for sustainable production.
Join the third edition of the international congress 'Innovation for Sustainable Production 2012'
May, 6-9, 2012 - Bruges (Belgium)
http://www.i-sup2012.org
---
This e-mail, any attachments and the information it contains are confidential and meant only for the use of the addressee(s) only. Access to this e-mail by anyone other than the addressee(s) is unauthorized. If you are not the intended addressee (or responsible for delivery of the message to such person), you may not use, copy, distribute or deliver to anyone this message (or any part of its contents) or take any action in reliance on it. In such case, you should destroy this message and notify the sender immediately. If you have received this e-mail in error, please notify us immediately by e-mail or telephone and delete the e-mail from any computer.
All reasonable precautions have been taken to ensure no viruses are present in this e-mail and its attachments. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use.

hi Bart,

these are the available user profiles (in 2.6.x -- I think this wasn't
changed since 2.6.4) :

public static final String ADMINISTRATOR = "Administrator";
public static final String USER_ADMIN = "UserAdmin";
public static final String REVIEWER = "Reviewer";
public static final String EDITOR = "Editor";
public static final String GUEST = "Guest";

So your exception message "Unknown profile : Registered User" is quite
accurate. Could you try it with one of the profiles above ?

Kind regards
Heikki Doeleman

On Fri, Jan 27, 2012 at 1:16 PM, Ooms Bart <bart.ooms@anonymised.com> wrote:

Hi all,

I want to add a user via the 'user.update' service with the profile
'Registered User'. It looks like the profile is not valid. The same request
with the profile 'Editor' works fine. Is this a bug in geonetwork? I'm
using version 2.6.4.
Regards
Bart

request:
curl -b cookie.txt -XPOST -H 'Content-type: application/xml' -d '<?xml
version="1.0"
encoding="UTF-8"?><request><operation>newuser</operation><username>plus</username><password>plus</password><profile>Registered
User</profile><groups>2</groups><groups>3</groups></request>'
${gn_url}/geonetwork/srv/en/user.update;

response:
<?xml version="1.0" encoding="UTF-8"?>
<error id="error">
<message>Unknown profile : Registered User</message>
<class>Exception</class>
<stack>
   <at class="org.fao.geonet.services.user.Update" file="Update.java"
line="86" method="exec" />
   <at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="238" method="execService" />
   <at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="141" method="execServices" />
   <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="399" method="dispatch" />
   <at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="670" method="dispatch" />
   <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="185" method="execute" />
   <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="108" method="doPost" />
   <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="727" method="service" />
   <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="820" method="service" />
   <at class="org.mortbay.jetty.servlet.ServletHolder"
file="ServletHolder.java" line="502" method="handle" />
</stack>
<request>
   <language>en</language>
   <service>user.update</service>
</request>
</error>

Uniting expertise from different fields of technology enhances the
development of innovative methods for sustainable production.
Join the third edition of the international congress 'Innovation for
Sustainable Production 2012'
May, 6-9, 2012 - Bruges (Belgium)
http://www.i-sup2012.org
---
This e-mail, any attachments and the information it contains are
confidential and meant only for the use of the addressee(s) only. Access
to this e-mail by anyone other than the addressee(s) is unauthorized. If
you are not the intended addressee (or responsible for delivery of the
message to such person), you may not use, copy, distribute or deliver to
anyone this message (or any part of its contents) or take any action in
reliance on it. In such case, you should destroy this message and notify
the sender immediately. If you have received this e-mail in error, please
notify us immediately by e-mail or telephone and delete the e-mail from any
computer.
All reasonable precautions have been taken to ensure no viruses are
present in this e-mail and its attachments. As our company cannot accept
responsibility for any loss or damage arising from the use of this e-mail
or attachments we recommend that you subject these to your virus checking
procedures prior to use.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork