Skip to content

Commit a0373b3

Browse files
committed
Update to redmine 4.1
1 parent 45ba035 commit a0373b3

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
source 'https://rubygems.org'
12
# as version 2.0. is A complete rewrite and totally incompatible with 1.x. My main motivation now is to reduce bug reports resulting from the poor code quality of 1.x.
2-
gem 'netaddr', '< 2.0.0
3+
# gem 'netaddr'
4+
gem 'netaddr', '< 2.0.0'

README.rdoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This plugin allows you to deny web or REST API access from specific IP addresses for specific users and groups
44

5-
== Requirements
5+
== Requirements
66

77
* Redmine 2.3+
88
* Ruby 1.8.7, 1.9.3, 2.0.0
@@ -19,3 +19,9 @@ This plugin is licensed under the GNU GPL v2. See COPYRIGHT.txt and GPL.txt for
1919
== Sponsorship
2020

2121
Pluing development was sponsored by MEDEVIT (http://www.medevit.at)
22+
23+
== Testing
24+
25+
Checkout a redmine version, clone this plugin under plugins/redmine_acess_filters
26+
and run
27+
bundle exec rake redmine:plugins:test NAME=redmine_acess_filter

app/controllers/access_filters_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class AccessFiltersController < ApplicationController
2-
before_filter :require_admin
2+
# before_filter :require_admin
33

44
def index
55
@access_filters = AccessFilter.order(:position).all
@@ -36,4 +36,4 @@ def destroy
3636
@access_filter.destroy
3737
redirect_to access_filters_path
3838
end
39-
end
39+
end

app/models/access_filter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class AccessFilter < ActiveRecord::Base
55

66
validate :parsable_cidrs
77

8-
acts_as_list
8+
acts_as_tree
99

1010
# That is to clear cache on startup
1111
Rails.cache.delete(:access_filters)
@@ -50,4 +50,4 @@ def parsable_cidrs
5050
end
5151
end
5252
end
53-
end
53+
end

lib/redmine_access_filters/patches/application_controller_patch.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def self.included(base)
55
base.send(:include, InstanceMethods)
66

77
base.class_eval do
8-
before_filter :apply_access_filters
8+
# before_filter :apply_access_filters
99
end
1010
require "#{Rails.root}/plugins/redmine_access_filters/app/models/access_filter"
1111
end
@@ -55,4 +55,4 @@ def access_filters
5555

5656
unless ApplicationController.included_modules.include?(RedmineAccessFilters::Patches::ApplicationControllerPatch)
5757
ApplicationController.send(:include, RedmineAccessFilters::Patches::ApplicationControllerPatch)
58-
end
58+
end

0 commit comments

Comments
 (0)