Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Jan 12, 2017
2 parents 289b522 + dada8f0 commit 4bfb231
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -51,6 +51,7 @@
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.schema.util.FocusTypeUtil;
import com.evolveum.midpoint.schema.util.ObjectResolver;
import com.evolveum.midpoint.schema.util.ObjectTypeUtil;
import com.evolveum.midpoint.security.api.Authorization;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.DOMUtil;
Expand Down Expand Up @@ -303,6 +304,7 @@ private <O extends ObjectType> void evaluateAssignmentWithResolvedTarget(Evaluat

LOGGER.trace("Checking for role cycle, comparing segment order {} with path order {}", assignmentPathSegment.getEvaluationOrder(), assignmentPath.getEvaluationOrder());
if (assignmentPath.containsTarget(target.asObjectable()) && assignmentPathSegment.getEvaluationOrder().equals(assignmentPath.getEvaluationOrder())) {
LOGGER.debug("Role cycle detected for target {} in {}", ObjectTypeUtil.toShortString(target), assignmentPath);
throw new PolicyViolationException("Attempt to assign "+target+" creates a role cycle");
}

Expand Down

0 comments on commit 4bfb231

Please sign in to comment.