Skip to content

Commit

Permalink
Delete permissions / Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonasAapro committed Dec 29, 2023
1 parent b0116c4 commit 472d11c
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 259 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
**/*{.,-}min.js
app/packs/src/vendor/**/*.js
vendor/*
app/packs/src/decidim/iframe-resizer/*.js
vendor/*
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ module Admin
# Note that it inherits from `Decidim::Admin::Components::BaseController`, which
# override its layout and provide all kinds of useful methods.
class ApplicationController < Decidim::Admin::ApplicationController
def permission_class_chain
[::Decidim::Iframe::Admin::Permissions] + super
end

before_action do
enforce_permission_to :update, :organization, organization: current_organization
end
end
end
end
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/decidim/iframe/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ module Iframe
# this engine inherit.
#
class ApplicationController < Decidim::ApplicationController
def permission_class_chain
[::Decidim::Iframe::Permissions] + super
end
end
end
end
33 changes: 0 additions & 33 deletions app/permissions/decidim/iframe/admin/permissions.rb

This file was deleted.

29 changes: 0 additions & 29 deletions app/permissions/decidim/iframe/permissions.rb

This file was deleted.

4 changes: 0 additions & 4 deletions lib/decidim/iframe/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
component.engine = Decidim::Iframe::Engine
component.admin_engine = Decidim::Iframe::AdminEngine
component.icon = "media/images/decidim_meetings.svg" # TODO: create a Icon
component.permissions_class_name = "Decidim::Iframe::Permissions"

# These actions permissions can be configured in the admin panel
# component.actions = %w()

RESIZE_OPTIONS = %w(responsive manual).freeze

Expand Down
5 changes: 0 additions & 5 deletions spec/i18n_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@
end

let(:i18n) { I18n::Tasks::BaseTask.new(locales: locales.split(",")) }
let(:missing_keys) { i18n.missing_keys }
let(:unused_keys) { i18n.unused_keys }
let(:non_normalized_paths) { i18n.non_normalized_paths }

it "does not have missing keys" do
expect(missing_keys).to be_empty, "#{missing_keys.inspect} are missing"
end

# it "does not have unused keys" do
# expect(unused_keys).to be_empty, "#{unused_keys.inspect} are unused"
# end
Expand Down
84 changes: 0 additions & 84 deletions spec/permissions/admin/permissions_spec.rb

This file was deleted.

92 changes: 0 additions & 92 deletions spec/permissions/permissions_spec.rb

This file was deleted.

2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
Decidim::Dev.dummy_app_path = File.expand_path(File.join(__dir__, "decidim_dummy_app"))

require "decidim/dev/test/base_spec_helper"

require "#{Dir.pwd}/lib/decidim/iframe/test/rspec_support/capybara.rb"

0 comments on commit 472d11c

Please sign in to comment.