for ( Map.Entry<String, RBACManager> entry : beans.entrySet() )
{
- UserManager userManager = applicationContext.getBean( entry.getKey(), UserManager.class );
- if ( userManager.isFinalImplementation() )
+ RBACManager rbacManager = applicationContext.getBean( entry.getKey(), RBACManager.class );
+ if ( rbacManager.isFinalImplementation() )
{
RBACManagerImplementationInformation information = new RBACManagerImplementationInformation();
information.setBeanId( StringUtils.substringAfter( entry.getKey(), "#" ) );
- information.setDescriptionKey( userManager.getDescriptionKey() );
- information.setReadOnly( userManager.isReadOnly() );
+ information.setDescriptionKey( rbacManager.getDescriptionKey() );
+ information.setReadOnly( rbacManager.isReadOnly() );
informations.add( information );
}
}
*/
import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
+import org.apache.archiva.rest.api.model.RBACManagerImplementationInformation;
import org.apache.archiva.rest.api.model.UserManagerImplementationInformation;
import org.apache.archiva.rest.api.services.RedbackRuntimeConfigurationService;
import org.fest.assertions.api.Assertions;
}
+ @Test
+ public void rbacmanagersinformations()
+ throws Exception
+ {
+ RedbackRuntimeConfigurationService service = getArchivaRuntimeConfigurationService();
+ List<RBACManagerImplementationInformation> infos = service.getRbacManagerImplementationInformations();
+ Assertions.assertThat( infos ).isNotNull().isNotEmpty().contains(
+ new RBACManagerImplementationInformation( "jdo", null, false ) );
+
+ }
+
}