summaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2014-09-06 03:39:52 +0000
committerJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2014-09-06 03:39:52 +0000
commitd00f875800fce1ec047570d8972c833d9da91858 (patch)
tree773f519dae83b2dfbb106b5ea17f1f9747949bad /app/models/user.rb
parent63cb3680c14b8582bc587917cac6d3ede604e412 (diff)
downloadredmine-d00f875800fce1ec047570d8972c833d9da91858.tar.gz
redmine-d00f875800fce1ec047570d8972c833d9da91858.zip
Make 2nd parameter optional in User#allowed_to_globally? for consistency (#6498).
git-svn-id: http://svn.redmine.org/redmine/trunk@13364 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 2993cc152..5f9674d2d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -567,7 +567,11 @@ class User < Principal
# Is the user allowed to do the specified action on any project?
# See allowed_to? for the actions and valid options.
- def allowed_to_globally?(action, options, &block)
+ #
+ # NB: this method is not used anywhere in the core codebase as of
+ # 2.5.2, but it's used by many plugins so if we ever want to remove
+ # it it has to be carefully deprecated for a version or two.
+ def allowed_to_globally?(action, options={}, &block)
allowed_to?(action, nil, options.reverse_merge(:global => true), &block)
end