use of com.thinkbiganalytics.security.rest.model.PermissionsChange in project kylo by Teradata.
the class SecurityModelTransform method addHierarchy.
//
// public void addAction(PermissionsChange change, com.thinkbiganalytics.security.action.Action domainAction) {
// ActionGroup actionSet = new ActionGroup("");
// addHierarchy(actionSet, domainAction.getHierarchy().iterator());
// }
private void addHierarchy(ActionGroup actionSet, Iterator<com.thinkbiganalytics.security.action.Action> itr) {
if (itr.hasNext()) {
com.thinkbiganalytics.security.action.Action domainAction = itr.next();
Action subAction = actionSet.getAction(domainAction.getSystemName()).map(sa -> sa).orElseGet(() -> {
Action newAction = new Action(domainAction.getSystemName());
actionSet.addAction(newAction);
return newAction;
});
addHierarchy(subAction, itr);
}
}
use of com.thinkbiganalytics.security.rest.model.PermissionsChange in project kylo by Teradata.
the class EntityLevelAccessIT method grantServiceActionToAnalysts.
private void grantServiceActionToAnalysts(Action action) {
LOG.debug("EntityLevelAccessIT.grantServiceActionToAnalysts");
runAs(ADMIN);
ActionGroup actions = new ActionGroup(SERVICES);
actions.addAction(action);
PermissionsChange permissionsChange = new PermissionsChange(PermissionsChange.ChangeType.REPLACE, actions);
permissionsChange.addGroup(GROUP_ANALYSTS);
permissionsChange.union(getServicePermissions(GROUP_ANALYSTS));
setServicePermissions(permissionsChange);
}
use of com.thinkbiganalytics.security.rest.model.PermissionsChange in project kylo by Teradata.
the class EntityLevelAccessIT method resetServicePermissionsForAnalysts.
private void resetServicePermissionsForAnalysts() {
LOG.debug("EntityLevelAccessIT.resetServicePermissionsForAnalysts");
runAs(ADMIN);
ActionGroup actions = new ActionGroup(SERVICES);
PermissionsChange permissionsChange = new PermissionsChange(PermissionsChange.ChangeType.REPLACE, actions);
permissionsChange.addGroup(GROUP_ANALYSTS);
setServicePermissions(permissionsChange);
}
Aggregations