isMember not working correctly for default authenticator? - Weblogic
This is a discussion on isMember not working correctly for default authenticator? - Weblogic ; As I understand the GroupReaderMBean javadoc, isMember should not recurse groups
if I pass a false value to the recurse parameter. This doesn't seem to be the
case.
Here is a sample scenario:
I create two groups: userGroup and customerGroup. ...
-
isMember not working correctly for default authenticator?
As I understand the GroupReaderMBean javadoc, isMember should not recurse groups
if I pass a false value to the recurse parameter. This doesn't seem to be the
case.
Here is a sample scenario:
I create two groups: userGroup and customerGroup. I assign customerGroup to
be a member of userGroup.
I create a user: myuser. I assign myuser to be a member of customerGroup.
Now, I want to find all the groups with which myuser is directly associated (i.e.
customerGroup). So, I iterate the group list calling isMember(myuser, aGroup,
false);
I would expect it to return true when aGroup = customerGroup, but not when aGroup
= userGroup. This is not the case it returns true for both groups even though
I supply false for the recursive parameter.
Am I misinterpreting the javadoc or is this a bug?
-
Re: isMember not working correctly for default authenticator?
You have reached farther using the GroupReaderMBean. Can you help me?
I am trying to check if the user is a member of the group before assigning a task.
MBeanHome adminHome;
String url = "http://127.0.0.1:10001" ;
adminHome = (MBeanHome)Helper.getMBeanHome ("weblogic","weblogic",url,server);
AuthenticationProviderMBean[] providers = adminHome.getActiveDomain().getSecurityConfigurati on().findDefaultRealm().getAuthenticationProviders ();
GroupReaderMBean groupReader = (GroupReaderMBean)providers[0];
groupReader.isMember(groupName, uId, false);
The last line throws an error: java.lang.NullPointerException
Am I missing something here??
-vsura