<commit_before>class EnterpriseRegistrationController < ApplicationController


  before_filter :login_required

  # CIRANDAS specific: only allow admins to access this
  protect 'edit_environment_features', :environment

  # Just go to the first step.
  #
  # FIXME: shouldn't this action present some sort of welcome message and point
  # to the first step explicitly?
  def index
    @validation = environment.organization_approval_method
    @create_enterprise = CreateEnterprise.new(params[:create_enterprise])
    if @validation == :region
      if params[:create_enterprise] && params[:create_enterprise][:target_id]
        @create_enterprise.target = Profile.find(params[:create_enterprise][:target_id])
      end
    elsif @validation == :admin || @validation == :none
      @create_enterprise.target = environment
    end
    @create_enterprise.requestor = user
    the_action =
      if request.post?
        if @create_enterprise.valid_before_selecting_target?
          if @create_enterprise.valid? || @validation == :none
            :creation
          elsif @create_enterprise.valid? || @validation == :admin<commit_msg>liberar pagina de registro de enterprise para usuarios<commit_after>class EnterpriseRegistrationController < ApplicationController


  before_filter :login_required

  # Just go to the first step.
  #
  # FIXME: shouldn't this action present some sort of welcome message and point
  # to the first step explicitly?
  def index
    @validation = environment.organization_approval_method
    @create_enterprise = CreateEnterprise.new(params[:create_enterprise])
    if @validation == :region
      if params[:create_enterprise] && params[:create_enterprise][:target_id]
        @create_enterprise.target = Profile.find(params[:create_enterprise][:target_id])
      end
    elsif @validation == :admin || @validation == :none
      @create_enterprise.target = environment
    end
    @create_enterprise.requestor = user
    the_action =
      if request.post?
        if @create_enterprise.valid_before_selecting_target?
          if @create_enterprise.valid? || @validation == :none
            :creation
          elsif @create_enterprise.valid? || @validation == :admin
{'fraction_non_alphanumeric': 0.08612873980054397, 'fraction_numerical': 0.0, 'mean_word_length': 3.915367483296214, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2650904', 'n_tokens_mistral': 598, 'n_tokens_neox': 586, 'n_words': 151}