@@ -353,6 +353,12 class User < Principal | |||||
353 | end |
|
353 | end | |
354 | end |
|
354 | end | |
355 |
|
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 | |||
|
361 | ||||
356 | def self.current=(user) |
|
362 | def self.current=(user) | |
357 | @current_user = user |
|
363 | @current_user = user | |
358 | end |
|
364 | end |
General Comments 0
You need to be logged in to leave comments.
Login now