Sha256: 0de1d30c7ef9e303b8e9af423cbe304e3adcc351f157b940bfd72a55bf1cf6ef

Contents?: true

Size: 1.27 KB

Versions: 2

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true
module Blacklight
  module AccessControls
    class Config
      def initialize
        @user_model = default_user_model

        @discover_group_field = default_discover_group_field
        @discover_user_field = default_discover_user_field

        @read_group_field = default_read_group_field
        @read_user_field = default_read_user_field

        @download_group_field = default_download_group_field
        @download_user_field = default_download_user_field
      end

      attr_accessor :user_model
      attr_accessor :discover_group_field, :discover_user_field
      attr_accessor :read_group_field, :read_user_field
      attr_accessor :download_group_field, :download_user_field

      def default_user_model
        'User'
      end

      def default_discover_group_field
        'discover_access_group_ssim'
      end

      def default_discover_user_field
        'discover_access_person_ssim'
      end

      def default_read_group_field
        'read_access_group_ssim'
      end

      def default_read_user_field
        'read_access_person_ssim'
      end

      def default_download_group_field
        'download_access_group_ssim'
      end

      def default_download_user_field
        'download_access_person_ssim'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blacklight-access_controls-0.6.1 lib/blacklight/access_controls/config.rb
blacklight-access_controls-0.6.0 lib/blacklight/access_controls/config.rb