Skip to content

Commit

Permalink
Register SiteMesh 3 filter on security chain if detected.
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Oct 8, 2024
1 parent 202c59a commit e5594b4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,12 @@ to default to 'Annotation'; setting value to 'Annotation'
}
log.trace 'Using SecurityContextHolder strategy {}', SCH.strategyName

// if sitemesh 3 is installed, an additional sitemesh 3 filter will need to be registered
// as part of the security filter chain so that pages are decorated using the security context
if (applicationContext.getBean('sitemesh3Secured')) {
SpringSecurityUtils.clientRegisterFilter('sitemesh3Secured', SecurityFilterPosition.FORM_CONTENT_FILTER.previous())
}

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

0 comments on commit e5594b4

Please sign in to comment.