Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
support for the 'redmine_sudo' plugin / v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tofi86 committed Feb 10, 2015
1 parent 6140f42 commit 5dd4e26
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
ChangeLog
---------

### v2.0.1
*(2015-02-10)*

* support for the "redmine_sudo" plugin
* https://github.com/jbbarth/redmine_sudo


### v2.0.0
*(2015-02-10)*

* maintenance messages support text formatting in textile or markdown style
* depending on the global redmine setting
* block ALL public pages and redirect to login
* display additional hint in the login window -> admin only during maintenance
* use 'deface' gem/plugin for views
* make sure to install this redmine plugin first: Redmine Base Deface (https://github.com/jbbarth/redmine_base_deface)


### v1.1.0
*(2014-08-08)*

* This fixes issues for accidentally logged out admin users which couldn't log in anymore during maintenance time


### v1.0.1
*(2014-07-15)*

* Bugfix release


### v1.0.0
*(2014-07-14)*

* initial release of 'redmine_maintenance_mode'
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
name 'Redmine Maintenance Mode'
author 'Tobias Fischer'
description 'This is a plugin to schedule and announce maintenance downtimes as well as disable user access to redmine during maintenance times.'
version '2.0.0'
version '2.0.1'
url 'https://github.com/tofi86/redmine_maintenance_mode'
author_url 'https://github.com/tofi86'

Expand Down
4 changes: 2 additions & 2 deletions lib/maintenance_mode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def show_maintenance_mode_page

# only activate maintenance message if maintenance mode is activated or if we're in the middle of a scheduled maintenance
if settings[:maintenance_active] || MaintenanceModeFunctions.is_now_scheduled_maintenance
# and only activate it for non-admin users
unless User.current.admin?
# and only activate it for non-admin users (or sudoers if 'redmine_sudo' plugin is installed)
unless User.current.admin? || (Redmine::Plugin.installed?("redmine_sudo") && User.current.sudoer?)
logout_user if User.current.logged?
require_login unless params[:controller] == "account" && params[:action] == "login"
return false
Expand Down

0 comments on commit 5dd4e26

Please sign in to comment.