Skip to content

Move the configuration of the SecurityContextHolder strategy #1139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 7.0.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ class SpringSecurityCoreGrailsPlugin extends Plugin {
log.trace sb.toString()
}

def strategyName = conf.sch.strategyName
if (strategyName instanceof CharSequence) {
SCH.strategyName = strategyName.toString()
}
log.trace 'Using SecurityContextHolder strategy {}', SCH.strategyName


Class beanTypeResolverClass = conf.beanTypeResolverClass ?: BeanTypeResolver
beanTypeResolver = beanTypeResolverClass.newInstance(conf, grailsApplication)

Expand Down Expand Up @@ -659,11 +666,6 @@ to default to 'Annotation'; setting value to 'Annotation'

applicationContext.roleHierarchy.hierarchy = roleHierarchy

def strategyName = conf.sch.strategyName
if (strategyName instanceof CharSequence) {
SCH.strategyName = strategyName.toString()
}
log.trace 'Using SecurityContextHolder strategy {}', SCH.strategyName

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