Skip to content

Commit

Permalink
Merge pull request #71 from vilanovailageltru/add-file-auth-handler
Browse files Browse the repository at this point in the history
Add file authorization handler
  • Loading branch information
mrcasals authored Jan 22, 2021
2 parents 409e101 + 609bdf3 commit 59e5d83
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ DECIDIM_VERSION = { git: 'https://github.com/decidim/decidim.git', tag: 'v0.23.1

gem 'decidim', DECIDIM_VERSION
gem 'decidim-verify_wo_registration', git: "https://github.com/CodiTramuntana/decidim-verify_wo_registration.git"
gem 'decidim-file_authorization_handler', git: "https://github.com/MarsBased/decidim-file_authorization_handler.git"

gem 'rails', '~> 5.2.4.4'
gem 'puma'
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ GIT
decidim-core (>= 0.20)
decidim-proposals (>= 0.20)

GIT
remote: https://github.com/MarsBased/decidim-file_authorization_handler.git
revision: dc54007dfc6b4c25c7b71f677a09d76f592d00e5
specs:
decidim-file_authorization_handler (0.15.0)
decidim (>= 0.15.0)
decidim-admin (>= 0.15.0)
rails (>= 5.2)

GIT
remote: https://github.com/decidim/decidim.git
revision: ac6191fa9b9ff2fa243a348142941334d8ee0ef8
Expand Down Expand Up @@ -795,6 +804,7 @@ DEPENDENCIES
database_cleaner
decidim!
decidim-dev!
decidim-file_authorization_handler!
decidim-verify_wo_registration!
faker (~> 1.9.6)
geocoder (~> 1.6.1)
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

mount Decidim::Core::Engine => '/'
mount Sidekiq::Web => '/sidekiq' if Rails.env.development?

mount Decidim::FileAuthorizationHandler::AdminEngine => '/admin'
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This migration comes from decidim_file_authorization_handler (originally 20171110120821)

# frozen_string_literal: true

class CreateDecidimFileAuthorizationHandlerCensusDatum < ActiveRecord::Migration[5.1]
def change
create_table :decidim_file_authorization_handler_census_data do |t|
t.references :decidim_organization, index: { name: "decidim_census_data_org_id_index" }
t.string :id_document
t.date :birthdate

# The rows in this table are immutable (insert or delete, not update)
# To explicitly reflect this fact there is no `updated_at` column
t.datetime "created_at", null: false
end
end
end
10 changes: 9 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2020_12_23_164198) do
ActiveRecord::Schema.define(version: 2021_01_22_145801) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -474,6 +474,14 @@
t.index ["resource_type", "resource_id"], name: "index_decidim_endorsements_on_resource_type_and_resource_id"
end

create_table "decidim_file_authorization_handler_census_data", force: :cascade do |t|
t.bigint "decidim_organization_id"
t.string "id_document"
t.date "birthdate"
t.datetime "created_at", null: false
t.index ["decidim_organization_id"], name: "decidim_census_data_org_id_index"
end

create_table "decidim_follows", force: :cascade do |t|
t.bigint "decidim_user_id", null: false
t.string "decidim_followable_type"
Expand Down

0 comments on commit 59e5d83

Please sign in to comment.