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;
}
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.