Skip to content

Commit 9a00aeb

Browse files
committed
* Moved handler bean to afterAspectsLoad() to allow for module based invalid events to work.
1 parent a4494f9 commit 9a00aeb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Added
1313

1414
* Moved the registration of the validator from the `configure()` to the `afterAspectsLoad()` interception point to allow for modules to declare the validator if needed.
15+
* Moved handler bean to `afterAspectsLoad()` to allow for module based invalid events to work.
1516

1617
----
1718

interceptors/Security.cfc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ component accessors="true" extends="coldbox.system.Interceptor" {
2828
* Configure the security firewall
2929
*/
3030
function configure(){
31-
variables.onInvalidEventHandlerBean = javacast( "null", "" );
32-
if ( len( variables.invalidEventHandler ) ) {
33-
variables.onInvalidEventHandlerBean = handlerService.getHandlerBean( variables.invalidEventHandler );
34-
}
35-
3631
// init the security modules dictionary
3732
variables.securityModules = {};
3833

@@ -83,6 +78,12 @@ component accessors="true" extends="coldbox.system.Interceptor" {
8378
// Register Module
8479
registerModule( arguments.module, arguments.config.settings.cbSecurity );
8580
} );
81+
82+
// Once ColdBox has loaded, load up the invalid event bean
83+
variables.onInvalidEventHandlerBean = javacast( "null", "" );
84+
if ( len( variables.invalidEventHandler ) ) {
85+
variables.onInvalidEventHandlerBean = handlerService.getHandlerBean( variables.invalidEventHandler );
86+
}
8687
}
8788

8889
/**

0 commit comments

Comments
 (0)