Search in sources :

Example 1 with UserRoleInfo

use of org.pentaho.platform.api.engine.security.userroledao.UserRoleInfo in project pentaho-platform by pentaho.

the class DefaultUserRoleListWebService method getUserRoleInfo.

@Override
public UserRoleInfo getUserRoleInfo() {
    UserRoleInfo userRoleInfo = new UserRoleInfo();
    userRoleInfo.setRoles(getAllRoles());
    userRoleInfo.setUsers(getAllUsers());
    return userRoleInfo;
}
Also used : UserRoleInfo(org.pentaho.platform.api.engine.security.userroledao.UserRoleInfo)

Example 2 with UserRoleInfo

use of org.pentaho.platform.api.engine.security.userroledao.UserRoleInfo in project pentaho-platform by pentaho.

the class UserDetailsRoleListWebServiceBase method testGetUserRoleInfo.

@Test
public void testGetUserRoleInfo() throws Exception {
    IUserRoleListWebService service = getUserRoleListWebService();
    try {
        // $NON-NLS-1$
        UserRoleInfo userRoleInfo = service.getUserRoleInfo();
        assertNotNull(userRoleInfo);
        assertEquals(userRoleInfo.getRoles().size(), 7);
        assertEquals(userRoleInfo.getUsers().size(), 4);
    } catch (Exception e) {
        Assert.fail();
    }
}
Also used : UserRoleInfo(org.pentaho.platform.api.engine.security.userroledao.UserRoleInfo) IUserRoleListWebService(org.pentaho.platform.security.userrole.ws.IUserRoleListWebService) Test(org.junit.Test)

Aggregations

UserRoleInfo (org.pentaho.platform.api.engine.security.userroledao.UserRoleInfo)2 Test (org.junit.Test)1 IUserRoleListWebService (org.pentaho.platform.security.userrole.ws.IUserRoleListWebService)1