X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7db862a48062c6086ea8a6787149afa7d66b1919..e40fdedbc285a0fa6af16e41b5b4f72e46e9987d:/apps/workbench/app/controllers/users_controller.rb diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb index c87bd25295..a98bb11a99 100644 --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@ -1,7 +1,7 @@ class UsersController < ApplicationController skip_before_filter :find_object_by_uuid, :only => [:welcome, :activity] skip_around_filter :thread_with_mandatory_api_token, :only => :welcome - before_filter :ensure_current_user_is_admin, only: :sudo + before_filter :ensure_current_user_is_admin, only: [:sudo, :unsetup] def welcome if current_user @@ -71,6 +71,14 @@ class UsersController < ApplicationController end end + def index_pane_list + if current_user.andand.is_admin + super | %w(Activity) + else + super + end + end + def sudo resp = $arvados_api_client.api(ApiClientAuthorization, '', { api_client_authorization: { @@ -129,4 +137,12 @@ class UsersController < ApplicationController f.html { render template: 'users/home' } end end + + def unsetup + if current_user.andand.is_admin + @object.unsetup @object + end + show + end + end