Search in sources :

Example 6 with XXModuleDefDao

use of org.apache.ranger.db.XXModuleDefDao in project ranger by apache.

the class TestXUserMgr method test23CreateVXUserGroupInfo.

@Test
public void test23CreateVXUserGroupInfo() {
    setup();
    VXUserGroupInfo vXUserGroupInfo = new VXUserGroupInfo();
    VXUser vXUser = vxUser();
    List<VXGroupUser> vXGroupUserList = new ArrayList<VXGroupUser>();
    List<VXGroup> vXGroupList = new ArrayList<VXGroup>();
    final VXGroup vXGroup1 = vxGroup();
    vXGroup1.setName("users");
    vXGroup1.setDescription("users -added for unit testing");
    vXGroupList.add(vXGroup1);
    VXGroupUser vXGroupUser1 = vxGroupUser();
    vXGroupUser1.setName("users");
    vXGroupUserList.add(vXGroupUser1);
    final VXGroup vXGroup2 = vxGroup();
    vXGroup2.setName("user1");
    vXGroup2.setDescription("user1 -added for unit testing");
    vXGroupList.add(vXGroup2);
    VXGroupUser vXGroupUser2 = vxGroupUser();
    vXGroupUser2.setName("user1");
    vXGroupUserList.add(vXGroupUser2);
    vXUserGroupInfo.setXuserInfo(vXUser);
    vXUserGroupInfo.setXgroupInfo(vXGroupList);
    Mockito.when(xUserService.createXUserWithOutLogin(vXUser)).thenReturn(vXUser);
    Mockito.when(xGroupService.createXGroupWithOutLogin(vXGroup1)).thenReturn(vXGroup1);
    Mockito.when(xGroupService.createXGroupWithOutLogin(vXGroup2)).thenReturn(vXGroup2);
    XXPortalUserDao portalUser = Mockito.mock(XXPortalUserDao.class);
    Mockito.when(daoManager.getXXPortalUser()).thenReturn(portalUser);
    XXPortalUser user = new XXPortalUser();
    user.setId(1L);
    user.setUserSource(RangerCommonEnums.USER_EXTERNAL);
    Mockito.when(portalUser.findByLoginId(vXUser.getName())).thenReturn(user);
    XXPortalUserRoleDao userDao = Mockito.mock(XXPortalUserRoleDao.class);
    Mockito.when(daoManager.getXXPortalUserRole()).thenReturn(userDao);
    List<String> existingRole = new ArrayList<String>();
    existingRole.add(RangerConstants.ROLE_USER);
    List<String> reqRoleList = new ArrayList<String>();
    reqRoleList.add(RangerConstants.ROLE_SYS_ADMIN);
    Mockito.when(userDao.findXPortalUserRolebyXPortalUserId(Mockito.anyLong())).thenReturn(reqRoleList);
    VXPortalUser vXPortalUser = userProfile();
    Mockito.when(userMgr.getUserProfileByLoginId(Mockito.anyString())).thenReturn(vXPortalUser);
    Mockito.when(userMgr.updateRoleForExternalUsers(Mockito.any(), Mockito.any(), (VXPortalUser) Mockito.any())).thenReturn(vXPortalUser);
    XXModuleDefDao xXModuleDefDao = Mockito.mock(XXModuleDefDao.class);
    XXUserPermissionDao xXUserPermissionDao = Mockito.mock(XXUserPermissionDao.class);
    XXUserDao xxUserDao = Mockito.mock(XXUserDao.class);
    Collection<String> userRoleList = new ArrayList<String>();
    userRoleList.add("ROLE_USER");
    vXPortalUser.setUserRoleList(userRoleList);
    VXUser vxUser = vxUser();
    XXUser xXUser = xxUser(vxUser);
    List<XXModuleDef> xXModuleDefs = xxModuleDefs();
    VXUserPermission userPermission = vxUserPermission();
    List<VXUserPermission> userPermList = new ArrayList<VXUserPermission>();
    userPermList.add(userPermission);
    List<XXUserPermission> xUserPermissionsList = new ArrayList<XXUserPermission>();
    XXUserPermission xUserPermissionObj = xxUserPermission();
    xUserPermissionObj.setModuleId(userPermission.getModuleId());
    xUserPermissionObj.setUserId(userPermission.getUserId());
    xUserPermissionsList.add(xUserPermissionObj);
    Mockito.when(daoManager.getXXModuleDef()).thenReturn(xXModuleDefDao);
    Mockito.when(xXModuleDefDao.getAll()).thenReturn(xXModuleDefs);
    Mockito.when(daoManager.getXXUserPermission()).thenReturn(xXUserPermissionDao);
    Mockito.when(daoManager.getXXUser()).thenReturn(xxUserDao);
    Mockito.when(xxUserDao.findByPortalUserId(vXPortalUser.getId())).thenReturn(xXUser);
    UserSessionBase userSession = Mockito.mock(UserSessionBase.class);
    Set<UserSessionBase> userSessions = new HashSet<UserSessionBase>();
    userSessions.add(userSession);
    Mockito.when(xUserPermissionService.createResource((VXUserPermission) Mockito.any())).thenReturn(userPermission);
    Mockito.when(sessionMgr.getActiveUserSessionsForPortalUserId(userId)).thenReturn(userSessions);
    VXUserGroupInfo vxUserGroupTest = xUserMgr.createXUserGroupFromMap(vXUserGroupInfo);
    Assert.assertEquals(userLoginID, vxUserGroupTest.getXuserInfo().getName());
    List<VXGroup> result = vxUserGroupTest.getXgroupInfo();
    List<VXGroup> expected = new ArrayList<VXGroup>();
    expected.add(vXGroup1);
    expected.add(vXGroup2);
    Assert.assertTrue(result.containsAll(expected));
    Mockito.verify(portalUser).findByLoginId(vXUser.getName());
    Mockito.verify(userDao).findXPortalUserRolebyXPortalUserId(Mockito.anyLong());
}
Also used : XXUser(org.apache.ranger.entity.XXUser) XXUserDao(org.apache.ranger.db.XXUserDao) ArrayList(java.util.ArrayList) XXModuleDefDao(org.apache.ranger.db.XXModuleDefDao) VXString(org.apache.ranger.view.VXString) VXUserPermission(org.apache.ranger.view.VXUserPermission) UserSessionBase(org.apache.ranger.common.UserSessionBase) XXPortalUserRoleDao(org.apache.ranger.db.XXPortalUserRoleDao) XXModuleDef(org.apache.ranger.entity.XXModuleDef) VXUserGroupInfo(org.apache.ranger.view.VXUserGroupInfo) VXPortalUser(org.apache.ranger.view.VXPortalUser) HashSet(java.util.HashSet) XXUserPermissionDao(org.apache.ranger.db.XXUserPermissionDao) VXGroupUser(org.apache.ranger.view.VXGroupUser) VXUser(org.apache.ranger.view.VXUser) XXUserPermission(org.apache.ranger.entity.XXUserPermission) XXPortalUser(org.apache.ranger.entity.XXPortalUser) XXPortalUserDao(org.apache.ranger.db.XXPortalUserDao) VXGroup(org.apache.ranger.view.VXGroup) Test(org.junit.Test)

Example 7 with XXModuleDefDao

use of org.apache.ranger.db.XXModuleDefDao in project ranger by apache.

the class TestXUserMgr method test97updateXModuleDefPermission.

@Test
public void test97updateXModuleDefPermission() {
    XXModuleDefDao xModuleDefDao = Mockito.mock(XXModuleDefDao.class);
    XXModuleDef xModuleDef = xxModuleDef();
    VXModuleDef vXModuleDef = vxModuleDef();
    Mockito.when(xModuleDefService.updateResource(vXModuleDef)).thenReturn(vXModuleDef);
    Mockito.when(daoManager.getXXModuleDef()).thenReturn(xModuleDefDao);
    Mockito.when(xModuleDefDao.getById(userId)).thenReturn(xModuleDef);
    Map<Long, String> xXGroupNameMap = new HashMap<Long, String>();
    xXGroupNameMap.put(userId, groupName);
    Mockito.when(xGroupService.getXXGroupIdNameMap()).thenReturn(xXGroupNameMap);
    Object[] objArr = new Object[] { userId, userId, userLoginID };
    Map<Long, Object[]> xXUserMap = new HashMap<Long, Object[]>();
    xXUserMap.put(userId, objArr);
    Mockito.when(xUserService.getXXPortalUserIdXXUserNameMap()).thenReturn(xXUserMap);
    Mockito.when(xModuleDefService.populateViewBean(xModuleDef, xXUserMap, xXGroupNameMap, true)).thenReturn(vXModuleDef);
    List<XXGroupPermission> xXGroupPermissions = new ArrayList<XXGroupPermission>();
    XXGroupPermission xGroupPermissionObj = xxGroupPermission();
    xXGroupPermissions.add(xGroupPermissionObj);
    VXGroupPermission vXGroupPermission = vxGroupPermission();
    vXGroupPermission.setIsAllowed(0);
    List<XXUserPermission> xXUserPermissions = new ArrayList<XXUserPermission>();
    XXUserPermission xUserPermissionObj = xxUserPermission();
    xXUserPermissions.add(xUserPermissionObj);
    VXUserPermission vxUserPermission = vxUserPermission();
    vxUserPermission.setIsAllowed(0);
    UserSessionBase userSession = Mockito.mock(UserSessionBase.class);
    Set<UserSessionBase> userSessions = new HashSet<UserSessionBase>();
    userSessions.add(userSession);
    XXGroupUserDao xxGroupUserDao = Mockito.mock(XXGroupUserDao.class);
    Mockito.when(daoManager.getXXGroupUser()).thenReturn(xxGroupUserDao);
    List<XXGroupUser> grpUsers = new ArrayList<XXGroupUser>();
    Mockito.when(xxGroupUserDao.findByGroupId(vXGroupPermission.getGroupId())).thenReturn(grpUsers);
    Mockito.when(sessionMgr.getActiveUserSessionsForPortalUserId(vxUserPermission.getUserId())).thenReturn(userSessions);
    Mockito.when(xGroupPermissionService.createResource((VXGroupPermission) Mockito.any())).thenReturn(vXGroupPermission);
    Mockito.when(xUserPermissionService.createResource((VXUserPermission) Mockito.any())).thenReturn(vxUserPermission);
    VXModuleDef dbMuduleDef = xUserMgr.updateXModuleDefPermission(vXModuleDef);
    Assert.assertEquals(dbMuduleDef, vXModuleDef);
    Assert.assertNotNull(dbMuduleDef);
    Assert.assertEquals(dbMuduleDef, vXModuleDef);
    Assert.assertEquals(dbMuduleDef.getId(), vXModuleDef.getId());
    Assert.assertEquals(dbMuduleDef.getOwner(), vXModuleDef.getOwner());
    Assert.assertEquals(dbMuduleDef.getUpdatedBy(), vXModuleDef.getUpdatedBy());
    Assert.assertEquals(dbMuduleDef.getUrl(), vXModuleDef.getUrl());
    Assert.assertEquals(dbMuduleDef.getAddedById(), vXModuleDef.getAddedById());
    Assert.assertEquals(dbMuduleDef.getCreateDate(), vXModuleDef.getCreateDate());
    Assert.assertEquals(dbMuduleDef.getCreateTime(), vXModuleDef.getCreateTime());
    Assert.assertEquals(dbMuduleDef.getUserPermList(), vXModuleDef.getUserPermList());
    Assert.assertEquals(dbMuduleDef.getGroupPermList(), vXModuleDef.getGroupPermList());
    Mockito.verify(xModuleDefService).updateResource(vXModuleDef);
    Mockito.verify(daoManager).getXXModuleDef();
    Mockito.verify(xModuleDefService).populateViewBean(xModuleDef, xXUserMap, xXGroupNameMap, true);
    Mockito.verify(xGroupService).getXXGroupIdNameMap();
    Mockito.verify(xUserService).getXXPortalUserIdXXUserNameMap();
}
Also used : XXGroupUser(org.apache.ranger.entity.XXGroupUser) XXGroupPermission(org.apache.ranger.entity.XXGroupPermission) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) XXModuleDefDao(org.apache.ranger.db.XXModuleDefDao) VXString(org.apache.ranger.view.VXString) XXUserPermission(org.apache.ranger.entity.XXUserPermission) VXUserPermission(org.apache.ranger.view.VXUserPermission) UserSessionBase(org.apache.ranger.common.UserSessionBase) XXGroupUserDao(org.apache.ranger.db.XXGroupUserDao) XXModuleDef(org.apache.ranger.entity.XXModuleDef) VXGroupPermission(org.apache.ranger.view.VXGroupPermission) VXModuleDef(org.apache.ranger.view.VXModuleDef) VXLong(org.apache.ranger.view.VXLong) HashSet(java.util.HashSet) Test(org.junit.Test)

Example 8 with XXModuleDefDao

use of org.apache.ranger.db.XXModuleDefDao in project ranger by apache.

the class TestXUserMgr method test113CreateOrUpdateXUsers.

@Test
public void test113CreateOrUpdateXUsers() {
    destroySession();
    setup();
    VXUser vXUser = vxUser();
    vXUser.setFirstName("null");
    vXUser.setLastName("null");
    List<VXUser> vXUserList = new ArrayList<VXUser>();
    vXUserList.add(vXUser);
    VXUserList users = new VXUserList(vXUserList);
    XXUserDao xxUserDao = Mockito.mock(XXUserDao.class);
    XXModuleDefDao xXModuleDefDao = Mockito.mock(XXModuleDefDao.class);
    XXGlobalStateDao xxGlobalStateDao = Mockito.mock(XXGlobalStateDao.class);
    XXUser xXUser = xxUser(vXUser);
    VXPortalUser vXPortalUser = userProfile();
    vXPortalUser.setFirstName("null");
    vXPortalUser.setLastName("null");
    XXPortalUser xXPortalUser = xxPortalUser(vXPortalUser);
    xXPortalUser.setUserSource(RangerCommonEnums.USER_EXTERNAL);
    List<String> lstRole = new ArrayList<String>();
    lstRole.add(RangerConstants.ROLE_SYS_ADMIN);
    List<XXModuleDef> xXModuleDefs = new ArrayList<XXModuleDef>();
    vXPortalUser.setUserRoleList(lstRole);
    Mockito.when(userMgr.getUserProfileByLoginId(vXUser.getName())).thenReturn(vXPortalUser);
    Mockito.when(daoManager.getXXUser()).thenReturn(xxUserDao);
    Mockito.when(xxUserDao.findByUserName(vXUser.getName())).thenReturn(xXUser);
    Mockito.when(daoManager.getXXModuleDef()).thenReturn(xXModuleDefDao);
    Mockito.when(daoManager.getXXGlobalState()).thenReturn(xxGlobalStateDao);
    Mockito.when(xXModuleDefDao.getAll()).thenReturn(xXModuleDefs);
    Mockito.when(xUserService.updateResource(vXUser)).thenReturn(vXUser);
    XXUserPermissionDao xUserPermissionDao = Mockito.mock(XXUserPermissionDao.class);
    Mockito.when(daoManager.getXXUserPermission()).thenReturn(xUserPermissionDao);
    List<XXUserPermission> xUserPermissionsList = new ArrayList<XXUserPermission>();
    XXUserPermission xUserPermissionObj = new XXUserPermission();
    xUserPermissionObj.setAddedByUserId(userId);
    xUserPermissionObj.setCreateTime(new Date());
    xUserPermissionObj.setId(userId);
    xUserPermissionObj.setIsAllowed(1);
    xUserPermissionObj.setModuleId(1L);
    xUserPermissionObj.setUpdatedByUserId(userId);
    xUserPermissionObj.setUpdateTime(new Date());
    xUserPermissionObj.setUserId(userId);
    xUserPermissionsList.add(xUserPermissionObj);
    Mockito.when(xUserPermissionDao.findByUserPermissionId(vXPortalUser.getId())).thenReturn(xUserPermissionsList);
    xUserMgr.createOrUpdateXUsers(users);
    vXUserList.clear();
    vXUser.setUserSource(RangerCommonEnums.USER_APP);
    vXUser.setFirstName("testuser");
    vXUser.setLastName("testuser");
    vXUser.setPassword("TestPassword@123");
    vXUserList.add(vXUser);
    users = new VXUserList(vXUserList);
    vXPortalUser = userProfile();
    vXPortalUser.setUserSource(RangerCommonEnums.USER_APP);
    vXPortalUser.setFirstName("testuser");
    vXPortalUser.setLastName("testuser");
    vXPortalUser.setPassword("TestPassword@123");
    vXPortalUser.setUserRoleList(lstRole);
    Mockito.when(userMgr.getUserProfileByLoginId(vXUser.getName())).thenReturn(vXPortalUser);
    Mockito.when(userMgr.updateUserWithPass((VXPortalUser) Mockito.any())).thenReturn(xXPortalUser);
    xUserMgr.createOrUpdateXUsers(users);
    vXUser.setPassword("*****");
    xUserMgr.createOrUpdateXUsers(users);
}
Also used : XXUser(org.apache.ranger.entity.XXUser) XXUserDao(org.apache.ranger.db.XXUserDao) XXUserPermissionDao(org.apache.ranger.db.XXUserPermissionDao) ArrayList(java.util.ArrayList) XXGlobalStateDao(org.apache.ranger.db.XXGlobalStateDao) XXModuleDefDao(org.apache.ranger.db.XXModuleDefDao) VXString(org.apache.ranger.view.VXString) VXUser(org.apache.ranger.view.VXUser) XXUserPermission(org.apache.ranger.entity.XXUserPermission) VXUserList(org.apache.ranger.view.VXUserList) Date(java.util.Date) XXPortalUser(org.apache.ranger.entity.XXPortalUser) XXModuleDef(org.apache.ranger.entity.XXModuleDef) VXPortalUser(org.apache.ranger.view.VXPortalUser) Test(org.junit.Test)

Example 9 with XXModuleDefDao

use of org.apache.ranger.db.XXModuleDefDao in project ranger by apache.

the class TestXUserMgr method test52createXGroupUserFromMap.

@Test
public void test52createXGroupUserFromMap() {
    setup();
    VXGroup vxGroup = vxGroup();
    VXUser vxUser = vxUser();
    List<VXUser> vXUserList = new ArrayList<VXUser>();
    vXUserList.add(vxUser);
    VXGroupUserInfo vxGUInfo = new VXGroupUserInfo();
    vxGUInfo.setXgroupInfo(vxGroup);
    vxGUInfo.setXuserInfo(vXUserList);
    XXUserDao xxUserDao = Mockito.mock(XXUserDao.class);
    XXPortalUserDao userDao = Mockito.mock(XXPortalUserDao.class);
    XXPortalUserRoleDao userRoleDao = Mockito.mock(XXPortalUserRoleDao.class);
    XXModuleDefDao xXModuleDefDao = Mockito.mock(XXModuleDefDao.class);
    XXUser xXUser = xxUser(vxUser);
    VXPortalUser userProfile = userProfile();
    XXPortalUser xXPortalUser = xxPortalUser(userProfile);
    xXPortalUser.setUserSource(RangerCommonEnums.USER_EXTERNAL);
    List<String> lstRole = new ArrayList<String>();
    lstRole.add(RangerConstants.ROLE_SYS_ADMIN);
    List<XXModuleDef> xXModuleDefs = new ArrayList<XXModuleDef>();
    Mockito.when(daoManager.getXXUser()).thenReturn(xxUserDao);
    Mockito.when(xxUserDao.findByUserName(vxUser.getName())).thenReturn(xXUser);
    Mockito.when(daoManager.getXXPortalUser()).thenReturn(userDao);
    Mockito.when(userDao.findByLoginId(vxUser.getName())).thenReturn(xXPortalUser);
    Mockito.when(xGroupService.createXGroupWithOutLogin(vxGroup)).thenReturn(vxGroup);
    Mockito.when(daoManager.getXXPortalUserRole()).thenReturn(userRoleDao);
    Mockito.when(userMgr.mapXXPortalUserToVXPortalUserForDefaultAccount(xXPortalUser)).thenReturn(userProfile);
    Mockito.when(daoManager.getXXModuleDef()).thenReturn(xXModuleDefDao);
    Mockito.when(xXModuleDefDao.getAll()).thenReturn(xXModuleDefs);
    VXGroupUserInfo vxGUInfoObj = xUserMgr.createXGroupUserFromMap(vxGUInfo);
    Assert.assertNotNull(vxGUInfoObj);
}
Also used : XXUser(org.apache.ranger.entity.XXUser) XXUserDao(org.apache.ranger.db.XXUserDao) ArrayList(java.util.ArrayList) XXModuleDefDao(org.apache.ranger.db.XXModuleDefDao) VXString(org.apache.ranger.view.VXString) VXUser(org.apache.ranger.view.VXUser) XXPortalUserRoleDao(org.apache.ranger.db.XXPortalUserRoleDao) XXPortalUser(org.apache.ranger.entity.XXPortalUser) XXModuleDef(org.apache.ranger.entity.XXModuleDef) VXGroupUserInfo(org.apache.ranger.view.VXGroupUserInfo) XXPortalUserDao(org.apache.ranger.db.XXPortalUserDao) VXPortalUser(org.apache.ranger.view.VXPortalUser) VXGroup(org.apache.ranger.view.VXGroup) Test(org.junit.Test)

Example 10 with XXModuleDefDao

use of org.apache.ranger.db.XXModuleDefDao in project ranger by apache.

the class TestXUserMgr method test38setUserRolesByExternalID.

@Test
public void test38setUserRolesByExternalID() {
    destroySession();
    setup();
    VXUser vXUser = vxUser();
    List<VXString> vStringRolesList = new ArrayList<VXString>();
    VXString vXStringObj = new VXString();
    vXStringObj.setValue("ROLE_USER");
    vStringRolesList.add(vXStringObj);
    List<XXPortalUserRole> xPortalUserRoleList = new ArrayList<XXPortalUserRole>();
    XXPortalUserRole XXPortalUserRole = new XXPortalUserRole();
    XXPortalUserRole.setId(userId);
    XXPortalUserRole.setUserId(userId);
    XXPortalUserRole.setUserRole("ROLE_USER");
    xPortalUserRoleList.add(XXPortalUserRole);
    List<XXUserPermission> xUserPermissionsList = new ArrayList<XXUserPermission>();
    XXUserPermission xUserPermissionObj = xxUserPermission();
    xUserPermissionsList.add(xUserPermissionObj);
    List<XXGroupPermission> xGroupPermissionList = new ArrayList<XXGroupPermission>();
    XXGroupPermission xGroupPermissionObj = xxGroupPermission();
    xGroupPermissionList.add(xGroupPermissionObj);
    List<VXGroupPermission> groupPermList = new ArrayList<VXGroupPermission>();
    VXGroupPermission groupPermission = vxGroupPermission();
    groupPermList.add(groupPermission);
    Mockito.when(xUserMgr.getXUser(userId)).thenReturn(vXUser);
    Mockito.when(userMgr.getUserProfileByLoginId(vXUser.getName())).thenReturn(null);
    List<String> permissionList = new ArrayList<String>();
    permissionList.add(RangerConstants.MODULE_USER_GROUPS);
    VXUser loggedInUser = vxUser();
    List<String> loggedInUserRole = new ArrayList<String>();
    loggedInUserRole.add(RangerConstants.ROLE_ADMIN);
    loggedInUser.setId(8L);
    loggedInUser.setName("testuser");
    loggedInUser.setUserRoleList(loggedInUserRole);
    Mockito.when(xUserService.getXUserByUserName("admin")).thenReturn(loggedInUser);
    XXModuleDefDao mockxxModuleDefDao = Mockito.mock(XXModuleDefDao.class);
    Mockito.when(daoManager.getXXModuleDef()).thenReturn(mockxxModuleDefDao);
    Mockito.when(mockxxModuleDefDao.findAccessibleModulesByUserId(8L, 8L)).thenReturn(permissionList);
    Mockito.when(restErrorUtil.createRESTException("User ID doesn't exist.", MessageEnums.INVALID_INPUT_DATA)).thenThrow(new WebApplicationException());
    thrown.expect(WebApplicationException.class);
    xUserMgr.setUserRolesByExternalID(userId, vStringRolesList);
}
Also used : XXGroupPermission(org.apache.ranger.entity.XXGroupPermission) WebApplicationException(javax.ws.rs.WebApplicationException) ArrayList(java.util.ArrayList) XXModuleDefDao(org.apache.ranger.db.XXModuleDefDao) VXString(org.apache.ranger.view.VXString) VXUser(org.apache.ranger.view.VXUser) XXUserPermission(org.apache.ranger.entity.XXUserPermission) VXString(org.apache.ranger.view.VXString) VXGroupPermission(org.apache.ranger.view.VXGroupPermission) XXPortalUserRole(org.apache.ranger.entity.XXPortalUserRole) Test(org.junit.Test)

Aggregations

XXModuleDefDao (org.apache.ranger.db.XXModuleDefDao)42 Test (org.junit.Test)42 ArrayList (java.util.ArrayList)37 VXString (org.apache.ranger.view.VXString)33 XXUserPermission (org.apache.ranger.entity.XXUserPermission)27 XXModuleDef (org.apache.ranger.entity.XXModuleDef)26 VXPortalUser (org.apache.ranger.view.VXPortalUser)26 VXUser (org.apache.ranger.view.VXUser)26 VXUserPermission (org.apache.ranger.view.VXUserPermission)22 XXUserPermissionDao (org.apache.ranger.db.XXUserPermissionDao)21 XXPortalUser (org.apache.ranger.entity.XXPortalUser)20 XXGroupPermission (org.apache.ranger.entity.XXGroupPermission)18 VXGroupPermission (org.apache.ranger.view.VXGroupPermission)18 XXPortalUserRoleDao (org.apache.ranger.db.XXPortalUserRoleDao)16 XXPortalUserDao (org.apache.ranger.db.XXPortalUserDao)15 XXPortalUserRole (org.apache.ranger.entity.XXPortalUserRole)15 Date (java.util.Date)14 UserSessionBase (org.apache.ranger.common.UserSessionBase)14 HashSet (java.util.HashSet)12 XXGroupPermissionDao (org.apache.ranger.db.XXGroupPermissionDao)12