Welcome Guest, Not a member yet? Register   Sign In
Authenticating models?
#1

[eluser]dgibsonky[/eluser]
Please forgive another foolish question, but this one is nagging me. I am authenticating my application with FreakAuth, and have included the proper code in my controllers to keep unauthenticated users out of my views.

However, I have to wonder if I need authentication in my models, as well? The models are where the real damage can be done (db writes and deletes), but I can't find any way to access them except through a controller. Am I covered by just including the FreakAuth calls in my controllers?

Thanks in advance for humoring another noob. Smile
#2

[eluser]Jelmer[/eluser]
If all the checking is done in your controllers before any actions are taken by your models there shouldn't be a concern.

So if you have the checking for example in your controller constructors, any users not authorized should be redirected before any model is used.
#3

[eluser]dgibsonky[/eluser]
Thanks, Jelmer...that's what I assumed, but I wanted to be sure.




Theme © iAndrew 2016 - Forum software by © MyBB