-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Instance authorization
PostPosted: Sun Apr 29, 2007 4:30 am 
Newbie

Joined: Sun Apr 29, 2007 4:27 am
Posts: 10
Location: Israel
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 find/findAll 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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 29, 2007 8:47 am 
Senior
Senior

Joined: Sat Apr 21, 2007 11:01 pm
Posts: 144
You could create a DAO method to strip out all un-authorised instances in the list of A. Or a method that just fetches autorised instances for A. *shrug*

_________________
Everytime you get an answer to your question without giving credit; god kills a kitten. :(


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.