Skip to content

Commit 9a63a8e

Browse files
authored
Merge pull request #1139 from lynchie14/issue_1138
Move the configuration of the SecurityContextHolder strategy
2 parents d954c42 + e22cbe1 commit 9a63a8e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

plugin-core/plugin/src/main/groovy/grails/plugin/springsecurity/SpringSecurityCoreGrailsPlugin.groovy

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ class SpringSecurityCoreGrailsPlugin extends Plugin {
215215
log.trace sb.toString()
216216
}
217217

218+
def strategyName = conf.sch.strategyName
219+
if (strategyName instanceof CharSequence) {
220+
SCH.strategyName = strategyName.toString()
221+
}
222+
log.trace 'Using SecurityContextHolder strategy {}', SCH.strategyName
223+
224+
218225
Class beanTypeResolverClass = conf.beanTypeResolverClass ?: BeanTypeResolver
219226
beanTypeResolver = beanTypeResolverClass.newInstance(conf, grailsApplication)
220227

@@ -659,11 +666,6 @@ to default to 'Annotation'; setting value to 'Annotation'
659666

660667
applicationContext.roleHierarchy.hierarchy = roleHierarchy
661668

662-
def strategyName = conf.sch.strategyName
663-
if (strategyName instanceof CharSequence) {
664-
SCH.strategyName = strategyName.toString()
665-
}
666-
log.trace 'Using SecurityContextHolder strategy {}', SCH.strategyName
667669

668670
// build filters here to give dependent plugins a chance to register some
669671
SortedMap<Integer, String> filterNames = ReflectionUtils.findFilterChainNames(conf)

0 commit comments

Comments
 (0)