summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-19 22:23:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-19 22:23:42 +0000
commit752c414e8abdcc20ffc845d7df931af11bb8d801 (patch)
tree1d34a104241c682cd9e43b211c8cebf1bd70d49c
parentb895f6434dddba9dc7575119491b695f607b93f4 (diff)
downloadredmine-752c414e8abdcc20ffc845d7df931af11bb8d801.tar.gz
redmine-752c414e8abdcc20ffc845d7df931af11bb8d801.zip
Set a default timeout value (#19851).
git-svn-id: http://svn.redmine.org/redmine/trunk@14354 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/sudo_mode.rb3
1 files changed, 2 insertions, 1 deletions
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