Where do you load security component

Hi
I have the security component working for one of my controllers but I have a few that need it and there will be a lot of duplication.

I have a blackhole function to redirect to https and that’s about it but rather than put it in all the required controllers I was wondering if it’s ok to somehow do this in the appcontroller.

I really just want all the pages that have the administration prefix to have the security component.

How do you load it?

Just looking for options as there’s not all that much on the Internet apart from duplicates of what’s in the docs.

Cheers

Okay

Once again I’ll answer my own question

You can indeed do this in the app controller

I added a check for admin prefix and loaded security component if true

Then in the before filter i checked the prefix again and did requiresecure if true

It all seems to be working

Cheers

1 Like