diff app/models/.svn/text-base/user.rb.svn-base @ 22:40f7cfd4df19

* Update to SVN trunk rev 4173
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 24 Sep 2010 14:06:04 +0100
parents 1d32c0a0efbf
children 94944d00e43c
line wrap: on
line diff
--- a/app/models/.svn/text-base/user.rb.svn-base	Wed Aug 25 16:30:24 2010 +0100
+++ b/app/models/.svn/text-base/user.rb.svn-base	Fri Sep 24 14:06:04 2010 +0100
@@ -352,6 +352,12 @@
       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