gaiaresources / ala-citizenscience

Automatically exported from code.google.com/p/ala-citizenscience
1 stars 4 forks source link

Moderation thresholds fail if records are submitted via the webservice #357

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a survey with a moderation scoped field.
2. Create a record using the ApplicationService.sync method.

What is the expected output? What do you see instead?
Expect the same as if the record was created via the web site, the record is 
held and emails are sent.
Instead:
Caused by: java.lang.NullPointerException
        at au.com.gaiaresources.bdrs.service.threshold.actionhandler.ModerationEmailActionHandler.executeAction(ModerationEmailActionHandler.java:67)

This is because the threshold relies on the User being set in the 
RequestContext and the web service does do so.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by chris.go...@gmail.com on 15 Oct 2012 at 2:42

GoogleCodeExporter commented 9 years ago
Added code to attach the UserDetails to the RequestContext in the 
ApplicationService after establishing the Users identity.
The whole web service authentication model needs work.

Original comment by chris.go...@gmail.com on 6 Nov 2012 at 11:20

Attachments:

GoogleCodeExporter commented 9 years ago
Do we really want to log the base64 encoded representation of the uploaded 
file? These are mainly photos and can be 5mb+ in size. It could lead to the log 
files in a prod server getting filled up extremely quickly.

Apart from that...

Reviews and accepted by a.low

Original comment by aaron.lo...@gmail.com on 7 Nov 2012 at 1:18

GoogleCodeExporter commented 9 years ago
Thanks Aaron, I've removed the logging.

Original comment by chris.go...@gmail.com on 7 Nov 2012 at 3:12