X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6eb3d1fb8fe71623fa63da46c250184cf2e4fbb8..97e018a1a8b9d4da6c99a9eb7be36a7f368615f9:/apps/workbench/app/controllers/application_controller.rb diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index db00be390a..ace9276e37 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -707,6 +707,7 @@ class ApplicationController < ActionController::Base @@notification_tests = [] @@notification_tests.push lambda { |controller, current_user| + return nil if Rails.configuration.shell_in_a_box_url AuthorizedKey.limit(1).where(authorized_user_uuid: current_user.uuid).each do return nil end @@ -832,6 +833,12 @@ class ApplicationController < ActionController::Base {collections: c, owners: own} end + helper_method :my_toplevel_projects + def my_toplevel_projects + @my_toplevel_projects ||= Group. + filter([['group_class','=','project'], ['owner_uuid', '=', current_user.uuid]]).order('name') + end + helper_method :my_project_tree def my_project_tree build_project_trees