aces / cbrain

CBRAIN is a flexible Ruby on Rails framework for accessing and processing of large data on high-performance computing infrastructures.
GNU General Public License v3.0
71 stars 42 forks source link

CBRAIN implementation for user ssh key data provider including ssh key download #1296

Closed MontrealSergiy closed 1 year ago

MontrealSergiy commented 1 year ago

also reformated the ssh key css class

MontrealSergiy commented 1 year ago

unittest fail

MontrealSergiy commented 1 year ago

@prioux Do not you think Auto registration simplifies the process of registration for new users?

prioux commented 1 year ago

No auto registration. I want users to know what files they connect in CBRAIN.

MontrealSergiy commented 1 year ago

all comments are covered

MontrealSergiy commented 1 year ago

the patch is merged into the pr

MontrealSergiy commented 1 year ago

At this point a condition in get_type_list method is redundant

--- a/BrainPortal/app/controllers/data_providers_controller.rb
+++ b/BrainPortal/app/controllers/data_providers_controller.rb
@@ -938,11 +938,8 @@ class DataProvidersController < ApplicationController

   def get_type_list #:nodoc:
     data_provider_list = [ "FlatDirSshDataProvider" ]
-    if check_role(:site_manager) || check_role(:admin_user)
       data_provider_list = DataProvider.descendants.map(&:name)
-      data_provider_list.delete(UserkeyFlatDirSshDataProvider.name) # this type is for regular users
-                                                                    # not for admins
-    end
+      data_provider_list.delete(UserkeyFlatDirSshDataProvider.name)  # this type only to be used with personal dp template
     grouped_options = data_provider_list.to_a.hashed_partitions { |name| name.constantize.pretty_category_name }
     grouped_options.delete(nil) # data providers that can not be on this list return a category name of nil, so we remove them
     grouped_options.keys.sort.map { |type| [ type, grouped_options[type].sort ] }