Hi all,
I am wanting to implement a single beforeroute() chunk of code that validates what page the user is on, and checks for the proper "role" before proceeding. However, I haven't come up with any good way to do so in a systematic way, and am wondering if anyone else can share what they typically do?
Right now I am checking role at my base controller, and inside any controllers that require more strict access I have another beforeroute() function that supercedes the extended base controller, so that I can check for access there separately. It doesn't feel like the cleanest method, but gets the job done.
Thanks!