I've replicated this, it does look like a bug.

In the REST API code, the ownerId query parameter for new, empty objects is
ignored and instead the value of the user making the request is used.

Instead it should only use the value of the user making the request if the
value is not supplied as a query string parameter.

Stuart - would you like to raise a JIRA issue for this?

It should be a relatively trivial code change - see:

https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org
/fcrepo/server/rest/FedoraObjectResource.java#L284

(line 284)

Steve



> -----Original Message-----
> From: Benjamin Armintor [mailto:armin...@gmail.com] 
> Sent: 07 July 2011 17:18
> To: Support and info exchange list for Fedora users.
> Subject: Re: [fcrepo-user] ownerId not working via REST API ingest
> 
> 
> Stuart-
>   Does the resulting object have no ownerId at all, or is 
> fedoraAdmin listed as the ownerId?
> 
> - Ben
> 
> On 7/7/11, Stuart Chalk <sch...@unf.edu> wrote:
> > I cannot get the ingest method of the ingest method of the 
> REST API to 
> > accept a value in get variable. I send the following rest 
> request via 
> > PHP
> >
> > Array
> > (
> >     [method] => POST
> >     [uri] => Array
> >         (
> >             [host] => localhost
> >             [port] => 8080
> >             [path] => /fedora/objects/eureka:exp10
> >             [query] => Array
> >                 (
> >                     [label] => Test experiment
> >                     [ownerId] => Stuart Chalk
> >                     [namespace] => eureka
> >                     [format] => info:fedora/fedora-system:FOXML-1.1
> >                     [logMessage] => Change made using pHedora
> >                 )
> >         )
> >     [auth] => Array
> >         (
> >             [method] => Basic
> >             [user] => fedoraAdmin
> >             [pass] => ********
> >         )
> >     [body] =>
> > )
> >
> > In fedora.log I get
> >
> > INFO 2011-07-07 07:00:38.339 [http-8080-2] (DefaultManagement) 
> > Completed ingest(objectXML, format: 
> info:fedora/fedora-system:FOXML-1.1, encoding:
> > UTF-8, pid  : eureka:exp10, logMessage: Change made using pHedora)
> >
> > i.e. no mention of the ownerId.  Is it even being used?
> >
> > Any thoughts appreciated...
> >
> > Stuart Chalk, Ph.D.
> > Associate Professor of Chemistry
> > Department of Chemistry, University of North Florida
> > 1 UNF Drive, Jacksonville FL 32224
> > P: 904-620-1938
> > F: 904-620-3535
> > E: sch...@unf.edu
> > W: http://www.unf.edu/coas/chemistry/
> >
> >
> > 
> ----------------------------------------------------------------------
> > --------
> > All of the data generated in your IT infrastructure is 
> seriously valuable.
> > Why? It contains a definitive record of application 
> performance, security
> > threats, fraudulent activity, and more. Splunk takes this 
> data and makes
> > sense of it. IT sense. And common sense.
> > http://p.sf.net/sfu/splunk-d2d-c2
> > _______________________________________________
> > Fedora-commons-users mailing list
> > Fedora-commons-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> >
> 
> --------------------------------------------------------------
> ----------------
> All of the data generated in your IT infrastructure is 
> seriously valuable. Why? It contains a definitive record of 
> application performance, security 
> threats, fraudulent activity, and more. Splunk takes this 
> data and makes 
> sense of it. IT sense. And common sense. 
> http://p.sf.net/sfu/splunk-d2d-c2 
> _______________________________________________
> Fedora-commons-users mailing list 
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> 


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to