if (config instanceof SecurityUserGroupServiceConfig){
boolean needsLockProtection =
GeoServerSecurityProvider.getProvider(GeoServerUserGroupService.class,
config.getClassName()).roleServiceNeedsLockProtection();
if (needsLockProtection)
service = new LockingUserGroupService(service);
}
service.setName(name);
service.initializeFromConfig(config);
if (config instanceof FileBasedSecurityServiceConfig) {