Sha256: 599869f581ce2bcbd461116ac2bda0cfd03e40f7a238964724ccf506ead5b897

Contents?: true

Size: 402 Bytes

Versions: 48

Compression:

Stored size: 402 Bytes

Contents

class Mdm::ApiKey < ActiveRecord::Base
  #
  # Validators
  #

  validate :supports_api
  validates :token, :presence => true, :length => { :minimum => 8 }

  protected

  def supports_api
    license = License.get

    if license and not license.supports_api?
      errors[:license] = " - this product does not support API access"
    end
  end

  ActiveSupport.run_load_hooks(:mdm_api_key, self)
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
metasploit_data_models-0.17.2-java app/models/mdm/api_key.rb
metasploit_data_models-0.17.2 app/models/mdm/api_key.rb
metasploit_data_models-0.17.2.pre.metasploit.pre.data.pre.models.pre.search app/models/mdm/api_key.rb
metasploit_data_models-0.17.1-java app/models/mdm/api_key.rb
metasploit_data_models-0.17.1 app/models/mdm/api_key.rb
metasploit_data_models-0.17.0-java app/models/mdm/api_key.rb
metasploit_data_models-0.17.0 app/models/mdm/api_key.rb
metasploit_data_models-0.16.9 app/models/mdm/api_key.rb
metasploit_data_models-0.16.9-java app/models/mdm/api_key.rb
metasploit_data_models-0.16.8 app/models/mdm/api_key.rb
metasploit_data_models-0.16.8-java app/models/mdm/api_key.rb
metasploit_data_models-0.16.7-java app/models/mdm/api_key.rb
metasploit_data_models-0.16.7 app/models/mdm/api_key.rb
metasploit_data_models-0.16.6-java app/models/mdm/api_key.rb
metasploit_data_models-0.16.6 app/models/mdm/api_key.rb
metasploit_data_models-0.16.5-java app/models/mdm/api_key.rb
metasploit_data_models-0.16.5 app/models/mdm/api_key.rb
metasploit_data_models-0.16.4-java app/models/mdm/api_key.rb
metasploit_data_models-0.16.4 app/models/mdm/api_key.rb
metasploit_data_models-0.16.3-java app/models/mdm/api_key.rb