Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
AMartindale98 committed Nov 14, 2024
1 parent 71c7157 commit 0f3558d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions templates/basic-security.groovy.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!groovy
import hudson.security.*
import jenkins.model.*
import jenkins.security.*

def instance = Jenkins.getInstance()
def hudsonRealm = new HudsonPrivateSecurityRealm(false)
Expand All @@ -15,7 +14,6 @@ if ("{{ jenkins_admin_username }}" in users_s) {
def user = hudson.model.User.get('{{ jenkins_admin_username }}');
def password = hudson.security.HudsonPrivateSecurityRealm.Details.fromPlainPassword('{{ jenkins_admin_password }}')
user.addProperty(password)

user.save()
}
else {
Expand All @@ -27,6 +25,4 @@ else {
def strategy = new FullControlOnceLoggedInAuthorizationStrategy()
instance.setAuthorizationStrategy(strategy)
instance.save()

user.save()
}

0 comments on commit 0f3558d

Please sign in to comment.