Search in sources :

Example 1 with RoleMembershipChange

use of com.thinkbiganalytics.security.rest.model.RoleMembershipChange in project kylo by Teradata.

the class EntityLevelAccessIT method assertAnalystCanEditFeedPermissions.

private void assertAnalystCanEditFeedPermissions() {
    LOG.debug("EntityLevelAccessIT.assertAnalystCanEditFeedPermissions");
    runAs(ANALYST);
    RoleMembershipChange roleChange = new RoleMembershipChange(RoleMembershipChange.ChangeType.REPLACE, PERMISSION_ADMIN);
    roleChange.addGroup(GROUP_ANALYSTS);
    setFeedEntityPermissions(roleChange, feed.getFeedId());
}
Also used : RoleMembershipChange(com.thinkbiganalytics.security.rest.model.RoleMembershipChange)

Example 2 with RoleMembershipChange

use of com.thinkbiganalytics.security.rest.model.RoleMembershipChange in project kylo by Teradata.

the class EntityLevelAccessIT method grantFeedEntityPermissionToAnalysts.

private void grantFeedEntityPermissionToAnalysts(String roleName) {
    LOG.debug("EntityLevelAccessIT.grantFeedEntityPermissionToAnalysts " + roleName);
    runAs(ADMIN);
    RoleMembershipChange roleChange = new RoleMembershipChange(RoleMembershipChange.ChangeType.REPLACE, roleName);
    roleChange.addGroup(GROUP_ANALYSTS);
    setFeedEntityPermissions(roleChange, feed.getFeedId());
}
Also used : RoleMembershipChange(com.thinkbiganalytics.security.rest.model.RoleMembershipChange)

Example 3 with RoleMembershipChange

use of com.thinkbiganalytics.security.rest.model.RoleMembershipChange in project kylo by Teradata.

the class EntityLevelAccessIT method revokeFeedEntityPermissionsFromAnalysts.

private void revokeFeedEntityPermissionsFromAnalysts() {
    LOG.debug("EntityLevelAccessIT.revokeFeedEntityPermissionsFromAnalysts");
    runAs(ADMIN);
    RoleMembershipChange roleChange = new RoleMembershipChange(RoleMembershipChange.ChangeType.REPLACE, PERMISSION_READ_ONLY);
    setFeedEntityPermissions(roleChange, feed.getFeedId());
    roleChange = new RoleMembershipChange(RoleMembershipChange.ChangeType.REPLACE, PERMISSION_EDITOR);
    setFeedEntityPermissions(roleChange, feed.getFeedId());
    roleChange = new RoleMembershipChange(RoleMembershipChange.ChangeType.REPLACE, PERMISSION_ADMIN);
    setFeedEntityPermissions(roleChange, feed.getFeedId());
}
Also used : RoleMembershipChange(com.thinkbiganalytics.security.rest.model.RoleMembershipChange)

Example 4 with RoleMembershipChange

use of com.thinkbiganalytics.security.rest.model.RoleMembershipChange in project kylo by Teradata.

the class EntityLevelAccessIT method assertAnalystCantEditFeedPermissions.

private void assertAnalystCantEditFeedPermissions(int status) {
    LOG.debug("EntityLevelAccessIT.assertAnalystCantEditFeedPermissions");
    runAs(ANALYST);
    RoleMembershipChange roleChange = new RoleMembershipChange(RoleMembershipChange.ChangeType.REPLACE, PERMISSION_ADMIN);
    roleChange.addGroup(GROUP_ANALYSTS);
    setFeedEntityPermissionsExpectingStatus(roleChange, feed.getFeedId(), status);
}
Also used : RoleMembershipChange(com.thinkbiganalytics.security.rest.model.RoleMembershipChange)

Aggregations

RoleMembershipChange (com.thinkbiganalytics.security.rest.model.RoleMembershipChange)4