Examples of deleteUsers()


Examples of org.apache.ambari.server.controller.AmbariManagementController.deleteUsers()

    AmbariManagementController managementController = createMock(AmbariManagementController.class);
    RequestStatusResponse response = createNiceMock(RequestStatusResponse.class);

    // set expectations
    managementController.deleteUsers(AbstractResourceProviderTest.Matcher.getUserRequestSet("User100"));

    // replay
    replay(managementController, response);

    ResourceProvider provider = AbstractResourceProvider.getResourceProvider(
View Full Code Here

Examples of org.apache.ambari.server.controller.AmbariManagementController.deleteUsers()

    AmbariManagementController managementController = createMock(AmbariManagementController.class);
    RequestStatusResponse response = createNiceMock(RequestStatusResponse.class);

    // set expectations
    managementController.deleteUsers(AbstractResourceProviderTest.Matcher.getUserRequestSet("User100"));

    // replay
    replay(managementController, response);

    ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
View Full Code Here

Examples of org.pentaho.platform.security.userroledao.ws.IUserRoleWebService.deleteUsers()

    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoUser[] usersObj = new ProxyPentahoUser[1];
    usersObj[0] = new ProxyPentahoUser();
    usersObj[0].setName( "test1" );
    try {
      service.deleteUsers( usersObj );
      Assert.fail();
    } catch ( UserRoleException e ) {
      Assert.assertTrue( "ERROR_0001 not found in " + e.getMessage(), e.getMessage().indexOf( "ERROR_0001" ) >= 0 );
    }
View Full Code Here

Examples of org.pentaho.platform.security.userroledao.ws.IUserRoleWebService.deleteUsers()

      Assert.assertTrue( "ERROR_0001 not found in " + e.getMessage(), e.getMessage().indexOf( "ERROR_0001" ) >= 0 );
    }

    isAdmin = true;

    service.deleteUsers( usersObj );

    Assert.assertEquals( 1, users.size() );
  }

  @Test
View Full Code Here

Examples of org.rhq.enterprise.server.auth.SubjectManagerLocal.deleteUsers()

        // this new user has no roles - therefore, no global permissions
        assert authorizationManager.getExplicitGlobalPermissions(new_user).size() == 0;

        try {
            subjectManager.deleteUsers(new_user, new int[] { new_user.getId() });
            assert false : "The new user should not have had the permission to delete itself";
        } catch (PermissionException e) {
        } finally {
            // PermissionException causes a rollback, let's start a new tx
            getTransactionManager().rollback();
View Full Code Here

Examples of org.rhq.enterprise.server.auth.SubjectManagerLocal.deleteUsers()

        getTransactionManager().begin();

        // delete the new user
        assert subjectManager.getSubjectByName(new_user.getName()).equals(new_user);
        assert subjectManager.isUserWithPrincipal(new_user.getName());
        subjectManager.deleteUsers(rhqadmin, new int[] { new_user.getId() });
        assert subjectManager.getSubjectByName(new_user.getName()) == null;
        assert !subjectManager.isUserWithPrincipal(new_user.getName());

        getTransactionManager().commit();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.