In MG2, Modelglue actually has its own onRequestStart event that you can
leverage, too. I wrote up my own approach to security in MG2 that might
help:
http://www.dougboude.com/blog/1/2007/07/Basic-Event-Security-in-ModelGlue-Applications.cfm

On Tue, Mar 8, 2011 at 2:32 PM, Dan Wilson <[email protected]> wrote:

> OnRequestStart runs before all requests all the time.
>
> If you use this for authentication checks, make sure to somehow allow your
> Login, ForgotPassword and other unauthenticated events through the check....
>
>
> DW
>
>
>
> On Tue, Mar 8, 2011 at 3:14 PM, worldcrafter <[email protected]>wrote:
>
>> The following in my ModelGlue.xml file in at the top of my controller:
>>
>> <message-listener message="onRequestStart" function="onRequestStart" /
>> >
>>
>> The onRequestStart cffunction exists in Controller.cfc as well.  It
>> appears to be running with every request I make in my application.
>>
>> Question: will the onRequestStart function *always* run before any/all
>> events in my application?
>>
>> The reason I ask is because I want to implement security on an MG2
>> site that I'm working on, and I would like to stick user
>> authentication checking code (to check whether a user is logged in or
>> not) into the onRequestStart function.  My basic thinking is that it
>> would be convenient to stick authentication checking code in that
>> function instead of having to create a function (e.g. isLoggedIn)
>> which is broadcast by every single function in my ModelGlue.xml file.
>>
>> TIA!
>>
>> --
>> Model-Glue Sites:
>> Home Page: http://www.model-glue.com
>> Documentation: http://docs.model-glue.com
>> Bug Tracker: http://bugs.model-glue.com
>> Blog: http://www.model-glue.com/blog
>>
>> You received this message because you are subscribed to the Google
>> Groups "model-glue" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/model-glue?hl=en
>
>
>
>
> --
> Plutarch - "The mind is not a vessel to be filled but a fire to be
> kindled."
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to