Skip to content

Commit

Permalink
Merge pull request #2634 from stavamichal/fixProblemWithMovingGroup
Browse files Browse the repository at this point in the history
Fix problem with creating a group union
  • Loading branch information
zlamalp committed Mar 24, 2020
2 parents 0ed410a + feeb3c8 commit 4e4b5c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4161,7 +4161,7 @@ public Group createGroupUnion(PerunSession sess, Group resultGroup, Group operan

// check indirect relationships (for example "A" with "A:B:C" are in indirect relationship using "A:B")
// looking for situation where result group is predecessor of operand group (by name) but not a parent of it (which is ok)
if(!parentFlag && operandGroup.getName().startsWith(resultGroup.getName())) {
if(!parentFlag && operandGroup.getName().startsWith(resultGroup.getName() + ":")) {
throw new GroupRelationNotAllowed("There is an indirect relationship between result group " + resultGroup +
" and operand group " + operandGroup);
}
Expand Down

0 comments on commit 4e4b5c9

Please sign in to comment.