use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method writeProjectLearnWithoutPermission.
/**
* yuwen write learn_project failed
*/
@Test
@WithMockUser(username = YUWEN, roles = { ROLE_USER })
public void writeProjectLearnWithoutPermission() {
ProjectInstance project = name2Projects.get(LEARN_PROJECT);
boolean result = aclEvaluate.hasProjectWritePermission(project);
Assert.assertFalse(result);
}
use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method operationProjectAnyWithoutCredentials.
// No.1 hasProjectReadPermission test end
// No.2 hasProjectOperationPermission test start
/**
* no credentials operation any project failed
*/
@Test(expected = AuthenticationCredentialsNotFoundException.class)
public void operationProjectAnyWithoutCredentials() {
ProjectInstance project = getRandomProjectInstance();
aclEvaluate.hasProjectOperationPermission(project);
}
use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method adminProjectKylinWithoutPermission.
/**
* zhangqiang admin kylin_project failed
*/
@Test
@WithMockUser(username = ZHANGQIANG, roles = { ROLE_USER })
public void adminProjectKylinWithoutPermission() {
ProjectInstance project = name2Projects.get(KYLIN_PROJECT);
boolean result = aclEvaluate.hasProjectAdminPermission(project);
Assert.assertFalse(result);
}
use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method writeProjectTestWithManagementPermission.
/**
* yuwen write test_project success
*/
@Test
@WithMockUser(username = YUWEN, roles = { ROLE_USER })
public void writeProjectTestWithManagementPermission() {
ProjectInstance project = name2Projects.get(TEST_PROJECT);
boolean result = aclEvaluate.hasProjectWritePermission(project);
Assert.assertTrue(result);
}
use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method readProjectAnyWithoutCredentials.
// No.1 hasProjectReadPermission test start
/**
* no credentials read any project failed
*/
@Test(expected = AuthenticationCredentialsNotFoundException.class)
public void readProjectAnyWithoutCredentials() {
ProjectInstance project = getRandomProjectInstance();
aclEvaluate.hasProjectReadPermission(project);
}
Aggregations