Search in sources :

Example 1 with UserManager

use of io.crate.user.UserManager in project crate by crate.

the class SysPrivilegesIntegrationTest method setUpNodesUsersAndPrivileges.

@Before
public void setUpNodesUsersAndPrivileges() throws Exception {
    super.createSessions();
    for (String userName : USERNAMES) {
        executeAsSuperuser("create user " + userName);
    }
    UserManager userManager = internalCluster().getInstance(UserManager.class);
    Long rowCount = userManager.applyPrivileges(USERNAMES, PRIVILEGES).get(5, TimeUnit.SECONDS);
    assertThat(rowCount, is(6L));
}
Also used : UserManager(io.crate.user.UserManager) Before(org.junit.Before)

Aggregations

UserManager (io.crate.user.UserManager)1 Before (org.junit.Before)1