Sha256: 7ebd457a03d78652e130bd1196218b7f6c3f84e48e617815873f633e7011203d
Contents?: true
Size: 869 Bytes
Versions: 10
Compression:
Stored size: 869 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim # # Including this concern will enable a `register_permissions` class method to # be used for configuring the permissions for the includer artifact. # module RegistersPermissions extend ActiveSupport::Concern def self.register_permissions(artifact, *) ::Decidim.permissions_registry.register_permissions(artifact, *) end class_methods do # Registers the permissions for the given `artifact`. # # +artifact+ is expected to be the class or module that declares `NeedsPermission.permission_class_chain`. # +permission_classes+ are subclasses of `DefaultPermissions` or at least should quack as one. def register_permissions(artifact, *) RegistersPermissions.register_permissions(artifact, *) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems