private SecuritySystem securitySystem;
@Inject
- @Named( value = "userConfiguration#default" )
+ @Named(value = "userConfiguration#default")
private UserConfiguration config;
/**
catch ( UserManagerException ume )
{
violations.add( "unable to initialize guest user properly: " + ume.getMessage() );
+ checked = true;
return;
}
policy.setEnabled( true );
}
- try
+ if ( guest != null )
{
- roleManager.assignRole( config.getString( UserConfigurationKeys.DEFAULT_GUEST ), guest.getUsername() );
+
+ try
+ {
+ roleManager.assignRole( config.getString( UserConfigurationKeys.DEFAULT_GUEST ),
+ guest.getUsername() );
+ }
+ catch ( RoleManagerException rpe )
+ {
+ violations.add( "unable to initialize guest user properly: " + rpe.getMessage() );
+ }
}
- catch ( RoleManagerException rpe )
+ else
{
- violations.add( "unable to initialize guest user properly: " + rpe.getMessage() );
+ violations.add( "cannot find neither create guest user" );
}
-
checked = true;
}
}