Sha256: 4864526004db443865b2d41f5910bb12ae6e008ecbc47569e9b78bd14cfead92

Contents?: true

Size: 639 Bytes

Versions: 33

Compression:

Stored size: 639 Bytes

Contents

# frozen_string_literal: true

module ShopifyApp
  module AccessScopes
    class ShopStrategy
      class << self
        def update_access_scopes?(shop_domain)
          shop_access_scopes = shop_access_scopes(shop_domain)
          configuration_access_scopes != shop_access_scopes
        end

        private

        def shop_access_scopes(shop_domain)
          ShopifyApp::SessionRepository.retrieve_shop_session_by_shopify_domain(shop_domain)&.scope
        end

        def configuration_access_scopes
          ShopifyAPI::Auth::AuthScopes.new(ShopifyApp.configuration.shop_access_scopes)
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
shopify_app-22.4.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-22.3.1 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-22.3.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-22.2.1 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-22.2.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-22.1.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-22.0.1 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-22.00.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.10.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.9.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.8.1 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.8.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.7.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.6.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.5.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.4.1 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.4.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.3.1 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.3.0 lib/shopify_app/access_scopes/shop_strategy.rb
shopify_app-21.2.0 lib/shopify_app/access_scopes/shop_strategy.rb