From 752c414e8abdcc20ffc845d7df931af11bb8d801 2015-06-19 22:23:42 From: Jean-Philippe Lang Date: 2015-06-19 22:23:42 Subject: [PATCH] Set a default timeout value (#19851). git-svn-id: http://svn.redmine.org/redmine/trunk@14354 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/sudo_mode.rb b/lib/redmine/sudo_mode.rb index afb510e..3f2749c 100644 --- a/lib/redmine/sudo_mode.rb +++ b/lib/redmine/sudo_mode.rb @@ -217,7 +217,8 @@ module Redmine # Timespan after which sudo mode expires when unused. def self.timeout - Redmine::Configuration['sudo_mode_timeout'].to_i.minutes + m = Redmine::Configuration['sudo_mode_timeout'].to_i + (m > 0 ? m : 15).minutes end end end