> > > This is about code intention. What is the intention about the code below? > > def ssl_required? > return false if !GitoriousConfig["use_ssl"] # readable, easy to > understand the intention > return true if request.ssl? # very easy too > !request.session_options[:expire_after].nil? && logged_in? # > Completely unclear to me what is the intention for this > end > > When I understand what is this code intention I can come with some > suggestion. >
I like your approach :) Gitorious should enforce SSL if: - use_ssl in gitorious.yml is true - the user is already on SSL - user is logged in - session is in use So !request.session_options[:expire_after].nil? is our "session is in use" flag. Suggestions? Christian -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
