From 752c414e8abdcc20ffc845d7df931af11bb8d801 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 19 Jun 2015 22:23:42 +0000 Subject: [PATCH] Set a default timeout value (#19851). git-svn-id: http://svn.redmine.org/redmine/trunk@14354 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/sudo_mode.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/redmine/sudo_mode.rb b/lib/redmine/sudo_mode.rb index afb510ea4..3f2749cd5 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 -- 2.39.5