Authorization to limit Data access
by Amol Ghotankar
Hello,
I am working on a web application which using Struts2, Spring & Hibernate.
I am working on authorization which I think is necessary corss cutting
feature of any application and needs to developed & kept very much isolated
from the business logic.
I am elaborating my requirement in detail as follows,
Assume a simple action which is authorized to be called by sales dept people
only. i.e showSales.action
When a user from purchase dept tries to call this action then, an
interceptors will check whether the user in role has the authorization to
access or not and deny access to purchase dept user to access this action
this is simple.
I have implemented this using before advice of Spring AOP rather than
interceptor. I hope i am not wrong?
But the bigger problem is
By how much, I mean for eg. if an *sales execute *logs in and clicks
showSales.action then he must be get view of his own sales list, but
when *sales
manager* logs in and calls same action i.e showSales.action then he must get
more* bigger n wider list, which can be union of data from all sales
executives.
Here authorization of some kind must be implemented which intercepts DAO's
and automatically sets the "where clause" in the sql query.
*I tried before advice of spring for DAO's also but problem is if where
clause is set somewhere within business logic then double where clause is
set which gives error and because I am using hibernate criteria's to set
restrictions on queries I have noticed this hibernate critera's are
immutable* (Is there anyway to change them?)
*
what should be the best way to solve this problem. Any Design Pattern
or s*omething
in hibernate that can help me here* or something other advice for it?
--
With Best Regards,
Amol Ghotankar
Cursive Technologies Pvt. Ltd.
www.cursivetech.com
14 years
build failure for hibernate-core master (with UTF-8)
by Scheper, Erik-Berndt
Hi,
While merging HHH-5750 from 3.6 branch to master, I encountered a build failure for the master branch of hibernate-core. This happened on my ubuntu VM. See the error log below.
Apparently some characters in newly introduced files (commit https://github.com/hibernate/hibernate-core/commit/1dc7317694c2725f49725d...) are unmappable for UTF8.
Should I use a different character set or is something amiss?
Kind regards,
Erik-Berndt
----------------
Download http://repo1.maven.org/maven2/net/sf/ehcache/ehcache-core/2.3.1/ehcache-c...
/java-apps/hibernate-core.git/hibernate-ehcache/src/main/java/org/hibernate/cache/AbstractEhCacheRegionFactory.java:6: unmappable character for encoding UTF8
* statements applied by the authors. �All third-party contributions are
^
/java-apps/hibernate-core.git/hibernate-ehcache/src/main/java/org/hibernate/cache/EhCacheRegionFactory.java:6: unmappable character for encoding UTF8
* statements applied by the authors. �All third-party contributions are
^
/java-apps/hibernate-core.git/hibernate-ehcache/src/main/java/org/hibernate/cache/SingletonEhCacheRegionFactory.java:6: unmappable character for encoding UTF8
* statements applied by the authors. �All third-party contributions are
^
3 errors
FAILURE: Build failed with an exception.
* Where:
Build file '/java-apps/hibernate-core.git/hibernate-ehcache/hibernate-ehcache.gradle'
* What went wrong:
Execution failed for task ':hibernate-ehcache:compileJava'.
Cause: Compile failed; see the compiler error output for details.
* Try:
Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.
BUILD FAILED
Total time: 9 mins 49.619 secs
Disclaimer:
This message contains information that may be privileged or confidential and is the property of Sogeti Nederland B.V. or its Group members. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
14 years
Hibernate Build and Tests
by Fred Toussi
I had seen some instructions on how to set up InteliJ IDEA to build and
run Hibernate tests before the move to Gradle (I cannot find that how-to
page now). It worked with IDEA 9 and I was running the tests until the
build system change.
Is there a how-to, especially with IDEA 10 and Gradle support?
Fred Toussi
14 years
IRC Dev Meetings
by Steve Ebersole
Lets put off the dev meetings on IRC for the next few weeks and pick it back
up the week after new years (Jan 3).
Hope everyone has a good and happy holidays!
---
Steve Ebersole <steve(a)hibernate.org>
http://hibernate.org
14 years
creating a Hibernate intellij project with gradle...
by Scott Marlow
I tried generating an intellij project for Hibernate but got a "Cause:
org.xml.sax.SAXParseException: Premature end of file." error.
To work around this, I used the following command which seemed to help.
gradle cleanIdea idea
I also ran the ^ command with a newer version (Gradle 0.9-rc-3) of
gradle, in case that helps others hitting the same parse error.
Scott
14 years