File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Instance authorization Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Instance authorization" Watch "Instance authorization" New topic
Author

Instance authorization

Sharon Adar
Greenhorn

Joined: Apr 29, 2007
Posts: 18
Hey,
I�ve a containment relation-ship: A contains B.

Class A {
@oneToMany(�)
Private List<B> bees;
}

In addition, I also have multiply clients, therefore I would like to use some instance authorization � which means not all users are allowed to see all B instances.
When working only with B layer � there�s no problem since I can edit the �select� function,
Yet when working with A layer, reading A will return all descending B instances without checking the authorization state.
What should I do in order to return A only with the authorized B instances?

Thanks!
Sharon.
Edvins Reisons
Ranch Hand

Joined: Dec 11, 2006
Posts: 364
The simplest thing that comes to mind is to apply some filter to the list before presenting it to the user.
 
IntelliJ Java IDE
 
subject: Instance authorization
 
Threads others viewed
Spring - Multiple IoC Containers with Singleton Bean in a JVM
New to Java - need help with basics (calling a function, etc.)
Exam questions on inner classes -help!
Accessing a session scoped variable anywhere outside the session scoped context
adding Objects to its Array
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com