Sha256: 9bbbc4c2e43f95a91d61f5ef166658d3983ba8c93c13129b1e26ecf3f9518ef5

Contents?: true

Size: 410 Bytes

Versions: 2

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true

module Spree
  class PermissionSet < Spree::Base
    has_many :role_permissions # rubocop:disable Rails/HasManyOrHasOneDependent
    has_many :roles, through: :role_permissions
    validates :name, :set, presence: true
    scope :display_permissions, -> { where('name LIKE ?', '%Display') }
    scope :management_permissions, -> { where('name LIKE ?', '%Management') }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_user_roles-2.0.1 app/models/spree/permission_set.rb
solidus_user_roles-2.0.0 app/models/spree/permission_set.rb