Model-Glue Tip - Marking an event private

Here is a little something I tend to forget that Model-Glue supports. If you mark an event as private, it cannot be accessed via the URL. So consider:

<event-handler name="revealA51"> <broadcasts> <message name="getSecrets" /> </broadcasts> <views> <include name="body" template="page.a51doesntexist.cfm" /> </views> </event-handler>

To load this event via the URL, you would simple go to a URL like so:

However, you can block this by simply adding access="private" to the XML:

<event-handler name="revealA51" access="private"> <broadcasts> <message name="getSecrets" /> </broadcasts> <views> <include name="body" template="page.a51doesntexist.cfm" /> </views> </event-handler>
Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA