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

Install module with UB OAuth and verifications #10

Merged
merged 4 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gem "decidim", "0.28.1"
gem "decidim-templates", "0.28.1"

gem "decidim-decidim_awesome", git: "https://github.com/decidim-ice/decidim-module-decidim_awesome", branch: "develop"
gem "decidim-ub"

gem "bootsnap", "~> 1.3"

Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ GEM
decidim-templates (0.28.1)
decidim-core (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-ub (0.1.1)
decidim-core (>= 0.28.0, < 0.29)
decidim-verifications (0.28.1)
decidim-core (= 0.28.1)
declarative-builder (0.1.0)
Expand Down Expand Up @@ -883,6 +885,7 @@ DEPENDENCIES
decidim-decidim_awesome!
decidim-dev (= 0.28.1)
decidim-templates (= 0.28.1)
decidim-ub
figaro (~> 1.2)
letter_opener_web (~> 2.0)
listen (~> 3.1)
Expand Down
13 changes: 13 additions & 0 deletions config/initializers/ub.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

Decidim::Ub.configure do |config|
config.omniauth = {
enabled: ENV["UB_CLIENT_ID"].present?,
icon_path: ENV.fetch("UB_ICON", "media/images/ub_logo.svg"),
client_id: ENV["UB_CLIENT_ID"].presence,
client_secret: ENV["UB_CLIENT_SECRET"].presence,
site: ENV["UB_SITE"].presence,
authorize_url: ENV["UB_AUTHORIZE_URL"].presence,
token_url: ENV["UB_TOKEN_URL"].presence
}
end
8 changes: 8 additions & 0 deletions db/migrate/20240711071117_add_ub_roles_to_users.decidim_ub.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_ub (originally 20240709154301)

class AddUbRolesToUsers < ActiveRecord::Migration[6.0]
def change
add_column :decidim_users, :ub_roles, :jsonb, default: []
end
end
3 changes: 2 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading