Sha256: 3fe0570d8005140bd9820bf86c91f1d247b57f2f445af4e6a722b3917480c870

Contents?: true

Size: 383 Bytes

Versions: 59

Compression:

Stored size: 383 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

  Metasploit::Concern.run(self)
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
metasploit_data_models-0.24.5 app/models/mdm/api_key.rb
metasploit_data_models-0.24.1.pre.rspec.pre.3.pre.1 app/models/mdm/api_key.rb
metasploit_data_models-0.24.1 app/models/mdm/api_key.rb
metasploit_data_models-0.24.0 app/models/mdm/api_key.rb
metasploit_data_models-0.23.3.pre.autoload app/models/mdm/api_key.rb
metasploit_data_models-0.23.2 app/models/mdm/api_key.rb
metasploit_data_models-0.23.2-java app/models/mdm/api_key.rb
metasploit_data_models-0.23.1 app/models/mdm/api_key.rb
metasploit_data_models-0.23.1-java app/models/mdm/api_key.rb
metasploit_data_models-0.23.0 app/models/mdm/api_key.rb
metasploit_data_models-0.23.0-java app/models/mdm/api_key.rb
metasploit_data_models-0.22.8 app/models/mdm/api_key.rb
metasploit_data_models-0.22.8-java app/models/mdm/api_key.rb
metasploit_data_models-0.22.7 app/models/mdm/api_key.rb
metasploit_data_models-0.22.7-java app/models/mdm/api_key.rb
metasploit_data_models-0.22.6 app/models/mdm/api_key.rb
metasploit_data_models-0.22.6-java app/models/mdm/api_key.rb
metasploit_data_models-0.22.5 app/models/mdm/api_key.rb
metasploit_data_models-0.22.5-java app/models/mdm/api_key.rb
metasploit_data_models-0.22.4 app/models/mdm/api_key.rb