Sha256: c595409e6d5d510f7367f0aad4102d228956572044b81e6e45bb97e3bff07927

Contents?: true

Size: 587 Bytes

Versions: 14

Compression:

Stored size: 587 Bytes

Contents

##
# Permission 是权限。

class Unidom::Authorization::Permission < Unidom::Authorization::ApplicationRecord

  self.table_name = 'unidom_permissions'

  include Unidom::Common::Concerns::ModelExtension
  include Unidom::Authorization::Concerns::AsPermission

  validates :name, presence:    true, length: { in: 2..self.columns_hash['name'].limit }
  validates :path, allow_blank: true, length: { in: 2..self.columns_hash['path'].limit }

  scope :path_is, ->(path) { where path: path }

end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Authorization::Permission'

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
unidom-authorization-2.0 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.10 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.9 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.8 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.7 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.6 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.5 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.4 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.3 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.2 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6.1 app/models/unidom/authorization/permission.rb
unidom-authorization-1.6 app/models/unidom/authorization/permission.rb
unidom-authorization-1.5 app/models/unidom/authorization/permission.rb
unidom-authorization-1.4.5 app/models/unidom/authorization/permission.rb