Brendiem / ala-citizenscience

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

Transaction handling allows user to bypass portal filters. #252

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. au.com.gaia...getSession().getTransaction().begin() will begin a transaction 
as one would expect. This transaction, however will not have the portal filter 
attached, and will cause general nastiness.

What is the expected output? What do you see instead?
What you really want to call is getSession().beginTransaction() which 
will give you a nice transaction with all the filters enabled.

What version of the product are you using? On what operating system?
All.

Please provide any additional information below.
This should be fixed. Not sure quite how, we could wrap the transaction I 
suppose.

Original issue reported on code.google.com by ajones17...@gmail.com on 9 May 2012 at 8:11

GoogleCodeExporter commented 9 years ago
One option is to get rid of the wrapper classes & use Spring AOP support to 
enhance the SessionFactory.getCurrentSession & SessionFactory.openSession 
methods to check for and install the filters before returning the session.

Original comment by chris.go...@gmail.com on 10 May 2012 at 12:12