<NME> engine.rb
<BEF> # frozen_string_literal: true

require "rails"
require "active_support/all"

require "devise"
require "devise-i18n"
require "decidim/core"
require "foundation_rails_helper"
require "doorkeeper"
require "doorkeeper-i18n"
require "hashdiff"

module Decidim
  module Admin
    # Decidim's core Rails Engine.
    class Engine < ::Rails::Engine
      isolate_namespace Decidim::Admin

      initializer "decidim_admin.mount_routes" do |_app|
        Decidim::Core::Engine.routes do
          mount Decidim::Admin::Engine => "/admin"
        end
      end

      initializer "decidim_admin.mime_types" do |_app|
        # Required for importer example downloads
        Mime::Type.register Decidim::Admin::Import::Readers::XLSX::MIME_TYPE, :xlsx
      end

      initializer "decidim_admin.global_moderation_menu" do
        Decidim.menu :admin_global_moderation_menu do |menu|
        Decidim.configure do |config|
          config.abilities += ["Decidim::Admin::Abilities::AdminUser"]
          config.abilities += ["Decidim::Admin::Abilities::ParticipatoryProcessAdmin"]
        end
      end
    end
                        I18n.t("actions.hidden", scope: "decidim.moderations"),
                        decidim_admin.moderations_path(hidden: true),
                        position: 2,
                        active: params[:hidden].present?
        end
      end

      initializer "decidim_admin.workflows_menu" do
        Decidim.menu :workflows_menu do |menu|
          Decidim::Verifications.admin_workflows.each do |manifest|
            next unless current_organization.available_authorizations.include?(manifest.name.to_s)

            workflow = Decidim::Verifications::Adapter.new(manifest)

            menu.add_item manifest.name.to_s,
                          workflow.fullname,
                          workflow.admin_root_path,
                          active: is_active_link?(workflow.admin_root_path)
          end
        end
      end

      initializer "decidim_admin.impersonate_menu" do
        Decidim.menu :impersonate_menu do |menu|
          menu.add_item :conflicts,
                        I18n.t("title", scope: "decidim.admin.conflicts"),
                        decidim_admin.conflicts_path,
                        active: is_active_link?(decidim_admin.conflicts_path),
                        if: allowed_to?(:index, :impersonatable_user)
        end
      end

      initializer "decidim_admin.admin_user_menu" do
        Decidim.menu :admin_user_menu do |menu|
          menu.add_item :users,
                        I18n.t("menu.admins", scope: "decidim.admin"), decidim_admin.users_path,
                        active: is_active_link?(decidim_admin.users_path),
                        if: allowed_to?(:read, :admin_user)
          menu.add_item :user_groups,
                        I18n.t("menu.user_groups", scope: "decidim.admin"), decidim_admin.user_groups_path,
                        active: is_active_link?(decidim_admin.user_groups_path),
                        if: current_organization.user_groups_enabled? && allowed_to?(:index, :user_group)
          menu.add_item :officializations,
                        I18n.t("menu.participants", scope: "decidim.admin"), decidim_admin.officializations_path,
                        active: is_active_link?(decidim_admin.officializations_path),
                        if: allowed_to?(:index, :officialization)
          menu.add_item :impersonatable_users,
                        I18n.t("menu.impersonations", scope: "decidim.admin"), decidim_admin.impersonatable_users_path,
                        active: is_active_link?(decidim_admin.impersonatable_users_path),
                        if: allowed_to?(:index, :impersonatable_user),
                        submenu: { target_menu: :impersonate_menu }

          menu.add_item :moderated_users,
                        I18n.t("menu.reported_users", scope: "decidim.admin"), decidim_admin.moderated_users_path,
                        active: is_active_link?(decidim_admin.moderated_users_path),
                        if: allowed_to?(:index, :moderate_users)
          menu.add_item :authorization_workflows,
                        I18n.t("menu.authorization_workflows", scope: "decidim.admin"), decidim_admin.authorization_workflows_path,
                        active: is_active_link?(decidim_admin.authorization_workflows_path),
                        if: allowed_to?(:index, :authorization),
                        submenu: { target_menu: :workflows_menu }
        end
      end

      initializer "decidim_admin.admin_settings_menu" do
        Decidim.menu :admin_settings_menu do |menu|
          menu.add_item :edit_organization,
                        I18n.t("menu.configuration", scope: "decidim.admin"),
                        decidim_admin.edit_organization_path,
                        position: 1.0,
                        if: allowed_to?(:update, :organization, organization: current_organization),
                        active: is_active_link?(decidim_admin.edit_organization_path)

          menu.add_item :edit_organization_appearance,
                        I18n.t("menu.appearance", scope: "decidim.admin"),
                        decidim_admin.edit_organization_appearance_path,
                        position: 1.1,
                        if: allowed_to?(:update, :organization, organization: current_organization),
                        active: is_active_link?(decidim_admin.edit_organization_appearance_path)

          menu.add_item :edit_organization_homepage,
                        I18n.t("menu.homepage", scope: "decidim.admin"),
                        decidim_admin.edit_organization_homepage_path,
                        position: 1.2,
                        if: allowed_to?(:update, :organization, organization: current_organization),
                        active: is_active_link?(decidim_admin.edit_organization_homepage_path, %r{^/admin/organization/homepage})

          menu.add_item :scopes,
                        I18n.t("menu.scopes", scope: "decidim.admin"),
                        decidim_admin.scopes_path,
                        position: 1.3,
                        if: allowed_to?(:read, :scope),
                        active: is_active_link?(decidim_admin.scopes_path)
          menu.add_item :scope_types,
                        I18n.t("menu.scope_types", scope: "decidim.admin"),
                        decidim_admin.scope_types_path,
                        position: 1.4,
                        if: allowed_to?(:read, :scope_type),
                        active: is_active_link?(decidim_admin.scope_types_path)
          menu.add_item :areas,
                        I18n.t("menu.areas", scope: "decidim.admin"),
                        decidim_admin.areas_path,
                        position: 1.5,
                        if: allowed_to?(:read, :area),
                        active: is_active_link?(decidim_admin.areas_path)

          menu.add_item :area_types,
                        I18n.t("menu.area_types", scope: "decidim.admin"),
                        decidim_admin.area_types_path,
                        position: 1.6,
                        if: allowed_to?(:read, :area_type),
                        active: is_active_link?(decidim_admin.area_types_path)

          menu.add_item :help_sections,
                        I18n.t("menu.help_sections", scope: "decidim.admin"),
                        decidim_admin.help_sections_path,
                        position: 1.6,
                        if: allowed_to?(:update, :help_sections),
                        active: is_active_link?(decidim_admin.help_sections_path)

          menu.add_item :external_domain_whitelist,
                        I18n.t("menu.external_domain_whitelist", scope: "decidim.admin"),
                        decidim_admin.edit_organization_external_domain_whitelist_path,
                        position: 1.7,
                        if: allowed_to?(:update, :organization, organization: current_organization),
                        active: is_active_link?(decidim_admin.edit_organization_external_domain_whitelist_path)
        end
      end

      initializer "decidim_admin.menu" do
        Decidim.menu :admin_menu do |menu|
          menu.add_item :dashboard,
                        I18n.t("menu.dashboard", scope: "decidim.admin"),
                        decidim_admin.root_path,
                        icon_name: "dashboard",
                        position: 1,
                        active: [%w(
                          decidim/admin/dashboard
                          decidim/admin/metrics
                        ), []]

          menu.add_item :moderations,
                        I18n.t("menu.moderation", scope: "decidim.admin"),
                        decidim_admin.moderations_path,
                        icon_name: "flag",
                        position: 4,
                        active: [%w(
                          decidim/admin/global_moderations
                          decidim/admin/global_moderations/reports
                        ), []],
                        if: allowed_to?(:read, :global_moderation)

          menu.add_item :static_pages,
                        I18n.t("menu.static_pages", scope: "decidim.admin"),
                        decidim_admin.static_pages_path,
                        icon_name: "book",
                        position: 4.5,
                        active: [%w(
                          decidim/admin/static_pages
                          decidim/admin/static_page_topics
                        ), []],
                        if: allowed_to?(:read, :static_page)

          menu.add_item :impersonatable_users,
                        I18n.t("menu.users", scope: "decidim.admin"),
                        allowed_to?(:read, :admin_user) ? decidim_admin.users_path : decidim_admin.impersonatable_users_path,
                        icon_name: "person",
                        position: 5,
                        active: [%w(
                          decidim/admin/users
                          decidim/admin/user_groups
                          decidim/admin/user_groups_csv_verifications
                          decidim/admin/officializations
                          decidim/admin/impersonatable_users
                          decidim/admin/conflicts
                          decidim/admin/moderated_users
                          decidim/admin/managed_users/impersonation_logs
                          decidim/admin/managed_users/promotions
                          decidim/admin/authorization_workflows
                          decidim/verifications/id_documents/admin/pending_authorizations
                          decidim/verifications/id_documents/admin/config
                          decidim/verifications/postal_letter/admin/pending_authorizations
                          decidim/verifications/csv_census/admin/census
                        ), []],
                        if: allowed_to?(:read, :admin_user) || allowed_to?(:read, :managed_user)

          menu.add_item :newsletters,
                        I18n.t("menu.newsletters", scope: "decidim.admin"),
                        decidim_admin.newsletters_path,
                        icon_name: "envelope-closed",
                        position: 6,
                        active: is_active_link?(decidim_admin.newsletters_path, :inclusive) ||
                                is_active_link?(decidim_admin.newsletter_templates_path, :inclusive),
                        if: allowed_to?(:index, :newsletter)

          menu.add_item :edit_organization,
                        I18n.t("menu.settings", scope: "decidim.admin"),
                        decidim_admin.edit_organization_path,
                        icon_name: "wrench",
                        position: 7,
                        active: [
                          %w(
                            decidim/admin/organization
                            decidim/admin/organization_appearance
                            decidim/admin/organization_homepage
                            decidim/admin/organization_homepage_content_blocks
                            decidim/admin/scopes
                            decidim/admin/scope_types
                            decidim/admin/areas decidim/admin/area_types
                            decidim/admin/help_sections
                            decidim/admin/organization_external_domain_whitelist
                          ),
                          []
                        ],
                        if: allowed_to?(:update, :organization, organization: current_organization)

          menu.add_item :logs,
                        I18n.t("menu.admin_log", scope: "decidim.admin"),
                        decidim_admin.logs_path,
                        icon_name: "dashboard",
                        position: 10,
                        active: [%w(decidim/admin/logs), []],
                        if: allowed_to?(:read, :admin_log)
        end
      end

      initializer "decidim_admin.add_cells_view_paths" do
        Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Admin::Engine.root}/app/cells")
        Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Admin::Engine.root}/app/views") # for partials
      end

      initializer "decidim_admin.webpacker.assets_path" do
        Decidim.register_assets_path File.expand_path("app/packs", root)
      end
    end
  end
end

<MSG> Actually include collaborator ability (#888)


<DFF> @@ -33,6 +33,7 @@ module Decidim
         Decidim.configure do |config|
           config.abilities += ["Decidim::Admin::Abilities::AdminUser"]
           config.abilities += ["Decidim::Admin::Abilities::ParticipatoryProcessAdmin"]
+          config.abilities += ["Decidim::Admin::Abilities::CollaboratorUser"]
         end
       end
     end

{'commit': 'diff --git a/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin.rb b/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin.rb\nindex 53834f247d..3a9bc7a027 100644\n--- a/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin.rb\n+++ b/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin.rb\n@@ -14,7 +14,7 @@ module Decidim\n         def initialize(user, _context)\n           @user = user\n \n-          return unless user && !user.role?(:admin)\n+          return unless user && !user.role?(:admin) && !user.role?(:collaborator)\n \n           can :read, :admin_dashboard do\n             participatory_processes.any?\ndiff --git a/decidim-admin/lib/decidim/admin/engine.rb b/decidim-admin/lib/decidim/admin/engine.rb\nindex 6c6a4318a5..54a6607261 100644\n--- a/decidim-admin/lib/decidim/admin/engine.rb\n+++ b/decidim-admin/lib/decidim/admin/engine.rb\n@@ -33,6 +33,7 @@ module Decidim\n         Decidim.configure do |config|\n           config.abilities += ["Decidim::Admin::Abilities::AdminUser"]\n           config.abilities += ["Decidim::Admin::Abilities::ParticipatoryProcessAdmin"]\n+          config.abilities += ["Decidim::Admin::Abilities::CollaboratorUser"]\n         end\n       end\n     end\n', 'commit_subject': 'Actually include collaborator ability (#888)', 'repo_name': 'decidim/decidim', 'committer': {'name': 'Oriol Gual', 'email': '78e79cc20ecd226e81c0937aad2139426c49a750@gmail.com', 'time_sec': '1486742758', 'tz_offset': '60', 'date': {'seconds': '1486742758'}}, 'commit_tree': 'b1ccd5382b00b4e6d1a03b1451ae2778614fc7e6', 'commit_message': 'Actually include collaborator ability (#888)\n\n', 'language_name': 'Ruby', 'license': 'agpl-3.0', 'hunks': '@@ -33,6 +33,7 @@ module Decidim\n         Decidim.configure do |config|\n           config.abilities += ["Decidim::Admin::Abilities::AdminUser"]\n           config.abilities += ["Decidim::Admin::Abilities::ParticipatoryProcessAdmin"]\n+          config.abilities += ["Decidim::Admin::Abilities::CollaboratorUser"]\n         end\n       end\n     end\n', 'addition_count': 1, 'deletion_count': 0, 'src_file': 'a/decidim-admin/lib/decidim/admin/engine.rb', 'tgt_file': 'b/decidim-admin/lib/decidim/admin/engine.rb', 'file_extension': '.rb', 'before_file': '# frozen_string_literal: true\n\nrequire "rails"\nrequire "active_support/all"\n\nrequire "devise"\nrequire "devise-i18n"\nrequire "decidim/core"\nrequire "foundation_rails_helper"\nrequire "doorkeeper"\nrequire "doorkeeper-i18n"\nrequire "hashdiff"\n\nmodule Decidim\n  module Admin\n    # Decidim\'s core Rails Engine.\n    class Engine < ::Rails::Engine\n      isolate_namespace Decidim::Admin\n\n      initializer "decidim_admin.mount_routes" do |_app|\n        Decidim::Core::Engine.routes do\n          mount Decidim::Admin::Engine => "/admin"\n        end\n      end\n\n      initializer "decidim_admin.mime_types" do |_app|\n        # Required for importer example downloads\n        Mime::Type.register Decidim::Admin::Import::Readers::XLSX::MIME_TYPE, :xlsx\n      end\n\n      initializer "decidim_admin.global_moderation_menu" do\n        Decidim.menu :admin_global_moderation_menu do |menu|\n        Decidim.configure do |config|\n          config.abilities += ["Decidim::Admin::Abilities::AdminUser"]\n          config.abilities += ["Decidim::Admin::Abilities::ParticipatoryProcessAdmin"]\n        end\n      end\n    end\n                        I18n.t("actions.hidden", scope: "decidim.moderations"),\n                        decidim_admin.moderations_path(hidden: true),\n                        position: 2,\n                        active: params[:hidden].present?\n        end\n      end\n\n      initializer "decidim_admin.workflows_menu" do\n        Decidim.menu :workflows_menu do |menu|\n          Decidim::Verifications.admin_workflows.each do |manifest|\n            next unless current_organization.available_authorizations.include?(manifest.name.to_s)\n\n            workflow = Decidim::Verifications::Adapter.new(manifest)\n\n            menu.add_item manifest.name.to_s,\n                          workflow.fullname,\n                          workflow.admin_root_path,\n                          active: is_active_link?(workflow.admin_root_path)\n          end\n        end\n      end\n\n      initializer "decidim_admin.impersonate_menu" do\n        Decidim.menu :impersonate_menu do |menu|\n          menu.add_item :conflicts,\n                        I18n.t("title", scope: "decidim.admin.conflicts"),\n                        decidim_admin.conflicts_path,\n                        active: is_active_link?(decidim_admin.conflicts_path),\n                        if: allowed_to?(:index, :impersonatable_user)\n        end\n      end\n\n      initializer "decidim_admin.admin_user_menu" do\n        Decidim.menu :admin_user_menu do |menu|\n          menu.add_item :users,\n                        I18n.t("menu.admins", scope: "decidim.admin"), decidim_admin.users_path,\n                        active: is_active_link?(decidim_admin.users_path),\n                        if: allowed_to?(:read, :admin_user)\n          menu.add_item :user_groups,\n                        I18n.t("menu.user_groups", scope: "decidim.admin"), decidim_admin.user_groups_path,\n                        active: is_active_link?(decidim_admin.user_groups_path),\n                        if: current_organization.user_groups_enabled? && allowed_to?(:index, :user_group)\n          menu.add_item :officializations,\n                        I18n.t("menu.participants", scope: "decidim.admin"), decidim_admin.officializations_path,\n                        active: is_active_link?(decidim_admin.officializations_path),\n                        if: allowed_to?(:index, :officialization)\n          menu.add_item :impersonatable_users,\n                        I18n.t("menu.impersonations", scope: "decidim.admin"), decidim_admin.impersonatable_users_path,\n                        active: is_active_link?(decidim_admin.impersonatable_users_path),\n                        if: allowed_to?(:index, :impersonatable_user),\n                        submenu: { target_menu: :impersonate_menu }\n\n          menu.add_item :moderated_users,\n                        I18n.t("menu.reported_users", scope: "decidim.admin"), decidim_admin.moderated_users_path,\n                        active: is_active_link?(decidim_admin.moderated_users_path),\n                        if: allowed_to?(:index, :moderate_users)\n          menu.add_item :authorization_workflows,\n                        I18n.t("menu.authorization_workflows", scope: "decidim.admin"), decidim_admin.authorization_workflows_path,\n                        active: is_active_link?(decidim_admin.authorization_workflows_path),\n                        if: allowed_to?(:index, :authorization),\n                        submenu: { target_menu: :workflows_menu }\n        end\n      end\n\n      initializer "decidim_admin.admin_settings_menu" do\n        Decidim.menu :admin_settings_menu do |menu|\n          menu.add_item :edit_organization,\n                        I18n.t("menu.configuration", scope: "decidim.admin"),\n                        decidim_admin.edit_organization_path,\n                        position: 1.0,\n                        if: allowed_to?(:update, :organization, organization: current_organization),\n                        active: is_active_link?(decidim_admin.edit_organization_path)\n\n          menu.add_item :edit_organization_appearance,\n                        I18n.t("menu.appearance", scope: "decidim.admin"),\n                        decidim_admin.edit_organization_appearance_path,\n                        position: 1.1,\n                        if: allowed_to?(:update, :organization, organization: current_organization),\n                        active: is_active_link?(decidim_admin.edit_organization_appearance_path)\n\n          menu.add_item :edit_organization_homepage,\n                        I18n.t("menu.homepage", scope: "decidim.admin"),\n                        decidim_admin.edit_organization_homepage_path,\n                        position: 1.2,\n                        if: allowed_to?(:update, :organization, organization: current_organization),\n                        active: is_active_link?(decidim_admin.edit_organization_homepage_path, %r{^/admin/organization/homepage})\n\n          menu.add_item :scopes,\n                        I18n.t("menu.scopes", scope: "decidim.admin"),\n                        decidim_admin.scopes_path,\n                        position: 1.3,\n                        if: allowed_to?(:read, :scope),\n                        active: is_active_link?(decidim_admin.scopes_path)\n          menu.add_item :scope_types,\n                        I18n.t("menu.scope_types", scope: "decidim.admin"),\n                        decidim_admin.scope_types_path,\n                        position: 1.4,\n                        if: allowed_to?(:read, :scope_type),\n                        active: is_active_link?(decidim_admin.scope_types_path)\n          menu.add_item :areas,\n                        I18n.t("menu.areas", scope: "decidim.admin"),\n                        decidim_admin.areas_path,\n                        position: 1.5,\n                        if: allowed_to?(:read, :area),\n                        active: is_active_link?(decidim_admin.areas_path)\n\n          menu.add_item :area_types,\n                        I18n.t("menu.area_types", scope: "decidim.admin"),\n                        decidim_admin.area_types_path,\n                        position: 1.6,\n                        if: allowed_to?(:read, :area_type),\n                        active: is_active_link?(decidim_admin.area_types_path)\n\n          menu.add_item :help_sections,\n                        I18n.t("menu.help_sections", scope: "decidim.admin"),\n                        decidim_admin.help_sections_path,\n                        position: 1.6,\n                        if: allowed_to?(:update, :help_sections),\n                        active: is_active_link?(decidim_admin.help_sections_path)\n\n          menu.add_item :external_domain_whitelist,\n                        I18n.t("menu.external_domain_whitelist", scope: "decidim.admin"),\n                        decidim_admin.edit_organization_external_domain_whitelist_path,\n                        position: 1.7,\n                        if: allowed_to?(:update, :organization, organization: current_organization),\n                        active: is_active_link?(decidim_admin.edit_organization_external_domain_whitelist_path)\n        end\n      end\n\n      initializer "decidim_admin.menu" do\n        Decidim.menu :admin_menu do |menu|\n          menu.add_item :dashboard,\n                        I18n.t("menu.dashboard", scope: "decidim.admin"),\n                        decidim_admin.root_path,\n                        icon_name: "dashboard",\n                        position: 1,\n                        active: [%w(\n                          decidim/admin/dashboard\n                          decidim/admin/metrics\n                        ), []]\n\n          menu.add_item :moderations,\n                        I18n.t("menu.moderation", scope: "decidim.admin"),\n                        decidim_admin.moderations_path,\n                        icon_name: "flag",\n                        position: 4,\n                        active: [%w(\n                          decidim/admin/global_moderations\n                          decidim/admin/global_moderations/reports\n                        ), []],\n                        if: allowed_to?(:read, :global_moderation)\n\n          menu.add_item :static_pages,\n                        I18n.t("menu.static_pages", scope: "decidim.admin"),\n                        decidim_admin.static_pages_path,\n                        icon_name: "book",\n                        position: 4.5,\n                        active: [%w(\n                          decidim/admin/static_pages\n                          decidim/admin/static_page_topics\n                        ), []],\n                        if: allowed_to?(:read, :static_page)\n\n          menu.add_item :impersonatable_users,\n                        I18n.t("menu.users", scope: "decidim.admin"),\n                        allowed_to?(:read, :admin_user) ? decidim_admin.users_path : decidim_admin.impersonatable_users_path,\n                        icon_name: "person",\n                        position: 5,\n                        active: [%w(\n                          decidim/admin/users\n                          decidim/admin/user_groups\n                          decidim/admin/user_groups_csv_verifications\n                          decidim/admin/officializations\n                          decidim/admin/impersonatable_users\n                          decidim/admin/conflicts\n                          decidim/admin/moderated_users\n                          decidim/admin/managed_users/impersonation_logs\n                          decidim/admin/managed_users/promotions\n                          decidim/admin/authorization_workflows\n                          decidim/verifications/id_documents/admin/pending_authorizations\n                          decidim/verifications/id_documents/admin/config\n                          decidim/verifications/postal_letter/admin/pending_authorizations\n                          decidim/verifications/csv_census/admin/census\n                        ), []],\n                        if: allowed_to?(:read, :admin_user) || allowed_to?(:read, :managed_user)\n\n          menu.add_item :newsletters,\n                        I18n.t("menu.newsletters", scope: "decidim.admin"),\n                        decidim_admin.newsletters_path,\n                        icon_name: "envelope-closed",\n                        position: 6,\n                        active: is_active_link?(decidim_admin.newsletters_path, :inclusive) ||\n                                is_active_link?(decidim_admin.newsletter_templates_path, :inclusive),\n                        if: allowed_to?(:index, :newsletter)\n\n          menu.add_item :edit_organization,\n                        I18n.t("menu.settings", scope: "decidim.admin"),\n                        decidim_admin.edit_organization_path,\n                        icon_name: "wrench",\n                        position: 7,\n                        active: [\n                          %w(\n                            decidim/admin/organization\n                            decidim/admin/organization_appearance\n                            decidim/admin/organization_homepage\n                            decidim/admin/organization_homepage_content_blocks\n                            decidim/admin/scopes\n                            decidim/admin/scope_types\n                            decidim/admin/areas decidim/admin/area_types\n                            decidim/admin/help_sections\n                            decidim/admin/organization_external_domain_whitelist\n                          ),\n                          []\n                        ],\n                        if: allowed_to?(:update, :organization, organization: current_organization)\n\n          menu.add_item :logs,\n                        I18n.t("menu.admin_log", scope: "decidim.admin"),\n                        decidim_admin.logs_path,\n                        icon_name: "dashboard",\n                        position: 10,\n                        active: [%w(decidim/admin/logs), []],\n                        if: allowed_to?(:read, :admin_log)\n        end\n      end\n\n      initializer "decidim_admin.add_cells_view_paths" do\n        Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Admin::Engine.root}/app/cells")\n        Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Admin::Engine.root}/app/views") # for partials\n      end\n\n      initializer "decidim_admin.webpacker.assets_path" do\n        Decidim.register_assets_path File.expand_path("app/packs", root)\n      end\n    end\n  end\nend\n', 'message': 'Actually include collaborator ability (#888)\n\n', 'author_name': 'Oriol Gual', 'lang': 'rb'}