comparison app/models/.svn/text-base/user.rb.svn-base @ 23:ca82a3468d27 cannam

* Merge SVN update from default
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 24 Sep 2010 14:17:42 +0100
parents 40f7cfd4df19
children 94944d00e43c
comparison
equal deleted inserted replaced
21:d0cd1f6335a5 23:ca82a3468d27
350 roles.detect {|r| r.allowed_to?(action)} || (self.logged? ? Role.non_member.allowed_to?(action) : Role.anonymous.allowed_to?(action)) 350 roles.detect {|r| r.allowed_to?(action)} || (self.logged? ? Role.non_member.allowed_to?(action) : Role.anonymous.allowed_to?(action))
351 else 351 else
352 false 352 false
353 end 353 end
354 end 354 end
355
356 # Is the user allowed to do the specified action on any project?
357 # See allowed_to? for the actions and valid options.
358 def allowed_to_globally?(action, options)
359 allowed_to?(action, nil, options.reverse_merge(:global => true))
360 end
355 361
356 def self.current=(user) 362 def self.current=(user)
357 @current_user = user 363 @current_user = user
358 end 364 end
359 365