Sha256: ecd995b87239a889f0d0a79787e527d8464e75b77620f7537e434ba731ecffa7

Contents?: true

Size: 656 Bytes

Versions: 6

Compression:

Stored size: 656 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module DirectVerifications
    module Verification
      module Admin
        # Defines the abilities related to direct_verifications for a logged in admin user.
        class Permissions < Decidim::DefaultPermissions
          def permissions
            return permission_action if permission_action.scope != :admin
            if user.organization.available_authorizations.include?("direct_verifications")
              allow! if permission_action.subject == Decidim::DirectVerifications::UserProcessor
              permission_action
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-direct_verifications-0.17.6 app/permissions/decidim/direct_verifications/verification/admin/permissions.rb
decidim-direct_verifications-0.17.5 app/permissions/decidim/direct_verifications/verification/admin/permissions.rb
decidim-direct_verifications-0.17.4 app/permissions/decidim/direct_verifications/verification/admin/permissions.rb
decidim-direct_verifications-0.17.3 app/permissions/decidim/direct_verifications/verification/admin/permissions.rb
decidim-direct_verifications-0.2.2 app/permissions/decidim/direct_verifications/verification/admin/permissions.rb
decidim-direct_verifications-0.2.1 app/permissions/decidim/direct_verifications/verification/admin/permissions.rb