File tree Expand file tree Collapse file tree 4 files changed +30
-19
lines changed Expand file tree Collapse file tree 4 files changed +30
-19
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ This plugin lets you add several privacy related options to Redmine projects
4
4
5
5
## Requirements
6
6
7
- - Redmine >= 3.4 .0
7
+ - Redmine >= 4.0 .0
8
8
9
9
## Installation
10
10
@@ -36,13 +36,17 @@ The GTT Project appreciates any [contributions](https://github.com/gtt-project/.
36
36
37
37
## Version History
38
38
39
+ - 2.0.0 Support Redmine 5.0 and drop Redmine <= 3.4 support
40
+ - 1.3.2 Publish on GitHub
41
+
39
42
See [ all releases] ( https://github.com/gtt-project/redmine_privacy/releases ) with release notes.
40
43
41
44
## Authors
42
45
43
46
- [ Jens Kraemer] ( https://github.com/jkraemer )
44
- - [ Ko Nagase] ( https://github.com/sanak )
45
47
- [ Daniel Kastl] ( https://github.com/dkastl )
48
+ - [ Thibault Mutabazi] ( https://github.com/eyewritecode )
49
+ - [ Ko Nagase] ( https://github.com/sanak )
46
50
- ... [ and others] ( https://github.com/gtt-project/redmine_privacy/graphs/contributors )
47
51
48
52
## LICENSE
Original file line number Diff line number Diff line change 1
- require 'redmine'
1
+ require File . expand_path ( '../lib/redmine_privacy/view_hooks' , __FILE__ )
2
2
3
- Rails . configuration . to_prepare do
4
- RedminePrivacy . setup
3
+ if Rails . version > '6.0' && Rails . autoloaders . zeitwerk_enabled?
4
+ Rails . application . config . after_initialize do
5
+ RedminePrivacy . setup
6
+ end
7
+ else
8
+ require 'redmine_privacy'
9
+ Rails . configuration . to_prepare do
10
+ RedminePrivacy . setup
11
+ end
5
12
end
6
13
7
14
Redmine ::Plugin . register :redmine_privacy do
10
17
author_url 'https://github.com/georepublic'
11
18
url 'https://github.com/gtt-project/redmine_privacy'
12
19
description 'Adds several privacy related options to Redmine'
13
- version '1.3.2 '
20
+ version '2.0.0 '
14
21
15
- requires_redmine version_or_higher : '3.4 .0'
22
+ requires_redmine version_or_higher : '4.0 .0'
16
23
17
24
settings default : { } , partial : 'redmine_privacy/settings'
18
25
Original file line number Diff line number Diff line change @@ -28,5 +28,3 @@ def self.displayname_fallback
28
28
User ::USER_FORMATS . keys . first
29
29
end
30
30
end
31
-
32
- require 'redmine_privacy/view_hooks'
Original file line number Diff line number Diff line change @@ -6,17 +6,19 @@ def self.apply
6
6
ProjectsController . prepend self unless ProjectsController < self
7
7
end
8
8
9
-
10
- def respond_to ( *_ , &block )
11
- if params [ :action ] == 'show'
12
- # having no users effectively hides the project members box
13
- if Redmine ::VERSION . to_a [ 0 ] >= 4 && Redmine ::VERSION . to_a [ 1 ] >= 2
14
- @principals_by_role = [ ]
15
- else
16
- @users_by_role = [ ]
17
- end
9
+ def show
10
+ respond_to do |format |
11
+ format . html {
12
+ super
13
+ # having no users effectively hides the project members box
14
+ if Redmine ::VERSION . to_s >= '4.2'
15
+ @principals_by_role = [ ]
16
+ else
17
+ @users_by_role = [ ]
18
+ end
19
+ }
20
+ format . any { super }
18
21
end
19
- super ( *_ , &block )
20
22
end
21
23
end
22
24
end
You can’t perform that action at this time.
0 commit comments