users@glassfish.java.net

Re: EJB authorization - getting the permissions from application clients

From: <glassfish_at_javadesktop.org>
Date: Fri, 26 Oct 2007 07:41:09 PDT

I did some research, without finding any solution.

However, what I am trying to do is to get the "method is allowed for this principal" on the bean side using the SecurityManager, so I can expose this information in my bean with something like:

@PermitAll
boolean isAllowed(method){
  //get the principal
  //then check with the SecurityManager to see if "method" is allowed
}

so I can write code on the client like:

if(bean.isAllowed(bean.getprice)){
  //add the button
}

Is this approach feasible?
[Message sent by forum member 'thedayofcondor' (thedayofcondor)]

http://forums.java.net/jive/thread.jspa?messageID=242373