#42 ✓resolved
Ward Vandewege

bug in 'create-an-admin-subsite' howto

Reported by Ward Vandewege | June 10th, 2008 @ 01:26 PM

The howto at http://hobocentral.net/docs/howtos/create-an-admin-subsite-in-hobo/ has a small bug in Action::AdminController:

before_filter :admin_required

def admin_required logged_in? && current_user.administrator? end

The admin_required function is supposed to redirect when a user is not logged in or not an administrator, not just return false.

The fix is trivial - here's an example:

def admin_required if not logged_in? && current_user.administrator? then redirect_to :back end end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages