Search in sources :

Example 1 with MotechURLSecurityService

use of org.motechproject.security.service.MotechURLSecurityService in project motech by motech.

the class MotechURLSecurityServiceBundleIT method setUp.

@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    securityService = getFromContext(MotechURLSecurityService.class, "motechURLSecurityService");
    authenticationManager = getFromContext(AuthenticationManager.class, "authenticationManager");
    motechUserService.registerMotechAdmin("motech", "motech", "aaa@admin.com", Locale.ENGLISH);
    setUpSecurityContext("motech", "motech", getPermissions());
    getSecurityRuleDataService().deleteAll();
    usersDataService.deleteAll();
    rolesDataService.deleteAll();
    rolesDataService.create(new MotechRole(SECURITY_MANAGE_ADMIN, asList(PermissionNames.MANAGE_URL_PERMISSION), false));
}
Also used : AuthenticationManager(org.springframework.security.authentication.AuthenticationManager) MotechURLSecurityService(org.motechproject.security.service.MotechURLSecurityService) MotechRole(org.motechproject.security.domain.MotechRole) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 MotechRole (org.motechproject.security.domain.MotechRole)1 MotechURLSecurityService (org.motechproject.security.service.MotechURLSecurityService)1 AuthenticationManager (org.springframework.security.authentication.AuthenticationManager)1