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());
}
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());
}
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());
}
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);
}
Aggregations