How to set job property check or select for Block inheritance of global authorization matrix through groovy script?

Article ID:204755024
1 minute readKnowledge base

Issue

  • I am trying to select 'Block inheritance of global authorization matrix' through groovy script, But I am not sure how to check this box using groovy code.

  • How to set job property check/select for 'Block inheritance of global authorization matrix' through groovy script?

Environment

  • CloudBees Jenkins Enterprise

  • Matrix Authorization Plugin

Resolution

private void setBlocksInheritance(boolean blocksInheritance)
{
this.blocksInheritance = blocksInheritance;
}