import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
+import javax.naming.NameAlreadyBoundException;
import javax.naming.NameNotFoundException;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
throws MappingException
{
+ if ( hasRole( context, roleName ) )
+ {
+ return true;
+ }
+
String groupName = findGroupName( roleName );
if ( groupName == null )
return true;
}
+ catch ( NameAlreadyBoundException e )
+ {
+ log.info( "skip group '{}' creation as already exists", groupName );
+ return true;
+ }
catch ( LdapException e )
{
throw new MappingException( e.getMessage(), e );