I have been pulling my hair out for 2 days and desperately need help if someone is able. I’m about to jump out a window.
I have an application, with a preProcess interceptor.
I have a module in that application called admin, with it’s own preProcess interceptor.
I need to separate the two preProcess interceptor events, so that the preProcess event in the main application DOES NOT run in the admin module, and the preProcess method in the admin module DOES NOT run in the main application.
I have attempted to achieve this by using the eventPattern annotation in the interceptor events, but since implementing this, my application has gone totally haywire and I just can’t seem to back out of it or get stability back. It’s driving me insane!!! I am sure the problem is that I have an issue with the way I am am isolating the interceptor methods between the main app and admin module.
Here are the two methods. If anyone can tell me if I am doing something wrong would be hugely appreciated.
/interceptors/Security.cfc
using event pattern to exclude this method from the admin module
public void function preProcess(required event, required interceptData) eventPattern="^(?!admin:)"{
/modules/admin/interceptors/AdminSecurity.cfc
using event pattern to only run this method in the admin module
public void function preProcess(required event, required interceptData) eventPattern="^admin:"{
Does this look right to those more experienced at CB than I? Should this eventPattern annotation be achieving my objective, or have I missed something.
Thank you!
Jason