1 Reply Latest reply on Dec 9, 2006 12:05 PM by starksm64

    How to get method permission roles from session bean

    francoisthirion

      How do I get the roles allowed to invoke a method from within a session bean?
      It seems that I can query the container:
      Set methodRoles = container.getMethodPermissions(mi.getMethod(), iface);
      And then call doesUserHaveRole, but how do I get a reference to the container from within a session bean?
      In essence, all I want to do is find out if the currently logged in person has permission to read (get methods), write (set methods), create (ejbCreate) and delete (ejbRemove) a particular entity so I can use this information to enable/disable certain features in a swing based fat client.
      What is the best way of getting this information?