Sha256: 8157201630b3669b909a054871a89647e5785372bb4043b45e7d05379bba8e46

Contents?: true

Size: 821 Bytes

Versions: 11

Compression:

Stored size: 821 Bytes

Contents

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
# == Schema Information
#
# Table name: permissions
#
#  id         :integer         not null, primary key
#  user_id    :integer
#  asset_id   :integer
#  asset_type :string(255)
#  created_at :datetime
#  updated_at :datetime
#

class Permission < ActiveRecord::Base
  belongs_to :user
  belongs_to :group
  belongs_to :asset, :polymorphic => true

  validates_presence_of :user_id, :unless => :group_id?
  validates_presence_of :group_id, :unless => :user_id?

  ActiveSupport.run_load_hooks(:fat_free_crm_permission, self)
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fat_free_crm-0.13.6 app/models/users/permission.rb
fat_free_crm-0.13.5 app/models/users/permission.rb
fat_free_crm-0.13.4 app/models/users/permission.rb
fat_free_crm-0.13.3 app/models/users/permission.rb
fat_free_crm-0.13.2 app/models/users/permission.rb
fat_free_crm-0.12.3 app/models/users/permission.rb
fat_free_crm-0.12.2 app/models/users/permission.rb
fat_free_crm-0.13.1 app/models/users/permission.rb
fat_free_crm-0.12.1 app/models/users/permission.rb
fat_free_crm-0.13.0 app/models/users/permission.rb
fat_free_crm-0.12.0 app/models/users/permission.rb