session['user'].nil?each time we want to ask if the user has permission to do so.
def user_authorized?(perm) #works with ACL controller
return session['user'].authorized?(perm) if not session['user'].nil?
return false
end
session['user'].nil?each time we want to ask if the user has permission to do so.
def user_authorized?(perm) #works with ACL controller
return session['user'].authorized?(perm) if not session['user'].nil?
return false
end
No comments:
Post a Comment