Why not simply make a session bean with two methods...getRecord() and
getRecord(User user)...or something like that.

The first method signature would only retrieve data for the currently logged
in user.  The second one would allow data to be retrieved for a different
user.

You then could restrict access to the second method, so that only people in
the "admin" role had access to it.

You could leave the first method wide open, security-wise.

In the end, you don't have to implement any special security, and the
role-based security of J2EE would take care of everything.

-dan

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 9:23 PM
To: jboss
Subject: [JBoss-user] Access control


It appears as if J2EE's use of JAAS gives me some control over which
users can use which methods in which beans. However, I have a couple
of concerns;

First, is there an easy explanation of the difference between groups
and roles?

Secondly, it doesn't seem to help me in the generic problem of wanting
to restrict access to certain database records. Basically, I have paul
and harry, both possessing the "customer" role. Paul should be able to
browse his own orders but not Harry's. I take it I am left to
implement this bit of secuity myself, in the lookups that I do?

Cheers
        Bent D
--
Bent Dalager - [EMAIL PROTECTED] - http://www.pvv.org/~bcd
                                    powered by emacs

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to