diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index c5c638f93..5ae7a56d3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -352,6 +352,12 @@ class User < Principal false end end + + # 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) + allowed_to?(action, nil, options.reverse_merge(:global => true)) + end def self.current=(user) @current_user = user |