Skip to content

Commit

Permalink
Support security-role in webrealms
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Oct 4, 2011
1 parent fc18a7f commit b27ea6a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rundeckapp/application.properties
Expand Up @@ -8,4 +8,4 @@ plugins.hibernate=1.2.0
plugins.jetty=1.2-SNAPSHOT
plugins.mail=0.9
plugins.quartz=0.4.2
plugins.webrealms=0.2
plugins.webrealms=0.3
5 changes: 5 additions & 0 deletions rundeckapp/grails-app/conf/WebrealmsConfig.groovy
Expand Up @@ -40,6 +40,11 @@ webrealms{
}
}
}
securityroles{
role{
name='user'
}
}

server{
addrealm{
Expand Down
15 changes: 14 additions & 1 deletion rundeckapp/webrealms/WebrealmsGrailsPlugin.groovy
Expand Up @@ -3,7 +3,7 @@ class WebrealmsGrailsPlugin {
def DEFAULT_CONFIG_FILE = "DefaultWebrealmsConfig"
def APP_CONFIG_FILE = "WebrealmsConfig"

def version = 0.2
def version = 0.3
def dependsOn = [:]

// TODO Fill in these fields
Expand Down Expand Up @@ -74,6 +74,19 @@ Simply generates definitions in web.xml to define login configuration with parti
}
}
}
if(config.securityroles){
def contextParam = xml."context-param"
contextParam[contextParam.size() - 1] + {
'security-role'{
def secroles=config.securityroles
secroles.each{role->
if(role.key=='role' && role.value.name){
'role-name'(role.value.name)
}
}
}
}
}

}
}
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion rundeckapp/webrealms/plugin.xml
@@ -1,4 +1,4 @@
<plugin name='webrealms' version='0.2' grailsVersion='1.2.0 &gt; *'>
<plugin name='webrealms' version='0.3' grailsVersion='1.2.0 &gt; *'>
<author>Greg Schueler</author>
<authorEmail>greg@dtosolutions.com</authorEmail>
<title>Allows configuration of web.xml to support UserRealms and security constraints</title>
Expand Down

0 comments on commit b27ea6a

Please sign in to comment.