use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method adminProjectAllWithAdminPermission.
/**
* kylin admin all projects success
*/
@Test
@WithMockUser(username = KYLIN, roles = { ROLE_USER })
public void adminProjectAllWithAdminPermission() {
for (ProjectInstance project : uuid2Projects.values()) {
boolean result = aclEvaluate.hasProjectAdminPermission(project);
Assert.assertTrue(result);
}
}
use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method writeProjectAnyWithoutCredentials.
// No.2 hasProjectOperationPermission test end
// No.3 hasProjectWritePermission test start
/**
* no credentials write any project failed
*/
@Test(expected = AuthenticationCredentialsNotFoundException.class)
public void writeProjectAnyWithoutCredentials() {
ProjectInstance project = getRandomProjectInstance();
aclEvaluate.hasProjectWritePermission(project);
}
use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method operationProjectLearnWithoutPermission.
/**
* yuwen operation learn_project failed
*/
@Test
@WithMockUser(username = YUWEN, roles = { ROLE_USER })
public void operationProjectLearnWithoutPermission() {
ProjectInstance project = name2Projects.get(LEARN_PROJECT);
boolean result = aclEvaluate.hasProjectOperationPermission(project);
Assert.assertFalse(result);
}
use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method operationProjectKylinWithOperationPermission.
/**
* zhangqiang operation kylin_project success
*/
@Test
@WithMockUser(username = ZHANGQIANG, roles = { ROLE_USER })
public void operationProjectKylinWithOperationPermission() {
ProjectInstance project = name2Projects.get(KYLIN_PROJECT);
boolean result = aclEvaluate.hasProjectOperationPermission(project);
Assert.assertTrue(result);
}
use of org.apache.kylin.metadata.project.ProjectInstance in project ranger by apache.
the class RangerKylinAuthorizerTest method writeProjectTestWithAdminPermission.
/**
* zhangqiang write test_project success
*/
@Test
@WithMockUser(username = ZHANGQIANG, roles = { ROLE_USER })
public void writeProjectTestWithAdminPermission() {
ProjectInstance project = name2Projects.get(TEST_PROJECT);
boolean result = aclEvaluate.hasProjectWritePermission(project);
Assert.assertTrue(result);
}
Aggregations