Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra user fields #426

Merged
merged 11 commits into from
Sep 4, 2023
Merged
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ gem "decidim-cache_cleaner"
gem "decidim-decidim_awesome"
gem "decidim-extended_socio_demographic_authorization_handler", git: "https://github.com/OpenSourcePolitics/decidim-module-extended_socio_demographic_authorization_handler.git",
branch: DECIDIM_BRANCH
gem "decidim-extra_user_fields", git: "https://github.com/paulinebessoles/decidim-module-extra_user_fields", branch: "feat/add_tests_0_27"
gem "decidim-friendly_signup", git: "https://github.com/OpenSourcePolitics/decidim-module-friendly_signup.git"
# TODO: Bump to 0.27.0 when released
# gem "decidim-gallery"
Expand Down
25 changes: 24 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ GIT
decidim-admin (~> 0.27.0)
decidim-core (~> 0.27.0)

GIT
remote: https://github.com/paulinebessoles/decidim-module-extra_user_fields
revision: 430933c63c5788fa19e223a455f602fc22f28ec4
branch: feat/add_tests_0_27
specs:
decidim-extra_user_fields (0.27.2)
country_select (~> 4.0)
decidim-core (>= 0.27.0, < 0.28)
deface (~> 1.5)

GIT
remote: https://github.com/sgruhier/foundation_rails_helper.git
revision: bc33600db7a2d16ce3cdc1f8369d0d7e7c4245b5
Expand Down Expand Up @@ -241,6 +251,13 @@ GEM
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
countries (3.1.0)
i18n_data (~> 0.11.0)
sixarm_ruby_unaccent (~> 1.1)
unicode_utils (~> 1.4)
country_select (4.0.0)
countries (~> 3.0)
sort_alphabetical (~> 1.0)
crack (0.4.5)
rexml
crass (1.0.6)
Expand Down Expand Up @@ -574,6 +591,7 @@ GEM
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
i18n_data (0.11.0)
icalendar (2.9.0)
ice_cube (~> 0.16)
ice_cube (0.16.4)
Expand Down Expand Up @@ -933,12 +951,15 @@ GEM
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sixarm_ruby_unaccent (1.2.2)
smart_properties (1.17.0)
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
social-share-button (1.2.4)
coffee-rails
sort_alphabetical (1.1.0)
unicode_utils (>= 1.2.2)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
Expand Down Expand Up @@ -969,6 +990,7 @@ GEM
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode-display_width (2.4.2)
unicode_utils (1.4.0)
valid_email2 (2.3.1)
activemodel (>= 3.2)
mail (~> 2.5)
Expand Down Expand Up @@ -1049,6 +1071,7 @@ DEPENDENCIES
decidim-decidim_awesome
decidim-dev (~> 0.27.0)
decidim-extended_socio_demographic_authorization_handler!
decidim-extra_user_fields!
decidim-friendly_signup!
decidim-homepage_interactive_map!
decidim-initiatives (~> 0.27.0)
Expand Down Expand Up @@ -1091,4 +1114,4 @@ RUBY VERSION
ruby 3.0.2p107

BUNDLED WITH
2.4.9
2.3.19
paulinebessoles marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true
# This migration comes from decidim_extra_user_fields (originally 20221024121407)

class AddExtraUserFieldsToDecidimOrganization < ActiveRecord::Migration[6.0]
def up
add_column :decidim_organizations, :extra_user_fields, :jsonb, default: { "enabled" => false }
end

def down
remove_column :decidim_organizations, :extra_user_fields, :jsonb
end
end
3 changes: 2 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: 2023_08_24_135807) do
ActiveRecord::Schema.define(version: 2023_08_31_093832) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -1331,6 +1331,7 @@
t.boolean "delete_inactive_users", default: false, null: false
t.integer "delete_inactive_users_email_after"
t.integer "delete_inactive_users_after"
t.jsonb "extra_user_fields", default: {"enabled"=>false}
t.index ["host"], name: "index_decidim_organizations_on_host", unique: true
t.index ["name"], name: "index_decidim_organizations_on_name", unique: true
end
Expand Down