app/models/user.rb
# add a user to the Unity user group (for data read access)
add a user to the Unity user group (for data read access)
add a user to the Unity user group ( for data read access )
def add_to_unity_user_group
    user_group_config = AdminConfiguration.find_by(config_type: 'Unity FireCloud User Group')
    if user_group_config.present?
      group_name = user_group_config.value
      Rails.logger.info "Adding #{self.email} to #{group_name} user group"
      ApplicationController.fire_cloud_client.add_user_to_group(group_name, 'member', self.email)
      self.update(added_to_unity_group: true)
      Rails.logger.info "User group registration complete"
    end
  end
def add_to_unity_user_group user_group_config = AdminConfiguration . find_by ( config_type : 'Unity FireCloud User Group' ) if user_group_config . present? group_name = user_group_config . value Rails . logger . info "Adding #{self.email} to #{group_name} user group" ApplicationController . fire_cloud_client . add_user_to_group ( group_name , 'member' , self . email ) self . update ( added_to_unity_group : true ) Rails . logger . info "User group registration complete" end end
add a user to the Unity user group (for data read access)
add a user to the Unity user group ( for data read access )