[Rails] Re: acl_system help is needed

Markus Kolb
Mon, 17 Jul 2006 11:09:21 -0000

Ezra Zygmuntowicz wrote on 17.07.2006 06:52:
> On Jul 16, 2006, at 9:46 PM, Josh Kieschnick wrote:

[...]
>> controller is the first thing the user sees. if the user isn''t
logged in
>> before going to a controller with "access_control" the
"current_user"
>> method returns nil and causes the whole thing to shut down.
[...]

> I think you have the right idea. You need to make sure that a user has
> authenticated before you let the access_control filter run. So only use
> access_control on actions in your controller that require user login.
> If one of your controller actions doesn''t need a user to log in to
see ,
> then it doesn''t need to perform access_control either.

The restrict_to and permit? helpers can be used without a login in the
views.