services/api/app/models/user.rb
def auto_setup_new_user
    setup(openid_prefix: Rails.configuration.default_openid_prefix)
    if username
      create_vm_login_permission_link(Rails.configuration.Users.AutoSetupNewUsersWithVmUUID,
                                      username)
      repo_name = "#{username}/#{username}"
      if Rails.configuration.Users.AutoSetupNewUsersWithRepository and
          Repository.where(name: repo_name).first.nil?
        repo = Repository.create!(name: repo_name, owner_uuid: uuid)
        Link.create!(tail_uuid: uuid, head_uuid: repo.uuid,
                     link_class: "permission", name: "can_manage")
      end
    end
  end
# Automatically setup new user during creation
Automatically setup new user during creation
Automatically setup new user during creation
def auto_setup_new_user
    setup(openid_prefix: Rails.configuration.default_openid_prefix)
    if username
      create_vm_login_permission_link(Rails.configuration.Users.AutoSetupNewUsersWithVmUUID,
                                      username)
      repo_name = "#{username}/#{username}"
      if Rails.configuration.Users.AutoSetupNewUsersWithRepository and
          Repository.where(name: repo_name).first.nil?
        repo = Repository.create!(name: repo_name, owner_uuid: uuid)
        Link.create!(tail_uuid: uuid, head_uuid: repo.uuid,
                     link_class: "permission", name: "can_manage")
      end
    end
  end
def auto_setup_new_user setup ( openid_prefix : Rails . configuration . default_openid_prefix ) if username create_vm_login_permission_link ( Rails . configuration . Users . AutoSetupNewUsersWithVmUUID , username ) repo_name = "#{username}/#{username}" if Rails . configuration . Users . AutoSetupNewUsersWithRepository and Repository . where ( name : repo_name ) . first . nil? repo = Repository . create! ( name : repo_name , owner_uuid : uuid ) Link . create! ( tail_uuid : uuid , head_uuid : repo . uuid , link_class : "permission" , name : "can_manage" ) end end end
Automatically setup new user during creation
Automatically setup new user during creation