<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://drew.invadelabs.com/index.php?action=history&amp;feed=atom&amp;title=JenkinsSecurityViaDSL</id>
	<title>JenkinsSecurityViaDSL - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://drew.invadelabs.com/index.php?action=history&amp;feed=atom&amp;title=JenkinsSecurityViaDSL"/>
	<link rel="alternate" type="text/html" href="https://drew.invadelabs.com/index.php?title=JenkinsSecurityViaDSL&amp;action=history"/>
	<updated>2026-05-14T11:55:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://drew.invadelabs.com/index.php?title=JenkinsSecurityViaDSL&amp;diff=845&amp;oldid=prev</id>
		<title>Drew: added JenkinsSecurityViaDSL</title>
		<link rel="alternate" type="text/html" href="https://drew.invadelabs.com/index.php?title=JenkinsSecurityViaDSL&amp;diff=845&amp;oldid=prev"/>
		<updated>2018-01-31T04:46:12Z</updated>

		<summary type="html">&lt;p&gt;added JenkinsSecurityViaDSL&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Jenkins Groovy DSL to change security to role strategy&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notes:&amp;#039;&amp;#039;&amp;#039; Role strategy plugin must be installed&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
import jenkins.model.*&lt;br /&gt;
import hudson.security.*&lt;br /&gt;
import com.michelin.cio.hudson.plugins.rolestrategy.*&lt;br /&gt;
def instance = Jenkins.getInstance()&lt;br /&gt;
def hudsonRealm = new HudsonPrivateSecurityRealm(false)&lt;br /&gt;
instance.setSecurityRealm(hudsonRealm)&lt;br /&gt;
def strategy = new RoleBasedAuthorizationStrategy()&lt;br /&gt;
strategy.add(Jenkins.ADMINISTER, &amp;quot;admin&amp;quot;)&lt;br /&gt;
instance.setAuthorizationStrategy(strategy)&lt;br /&gt;
instance.save()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Drew</name></author>
	</entry>
</feed>