Merge branch 'master' into feature/rs-oauth
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Râu Cao
2023-04-13 15:02:51 +02:00
62 changed files with 806 additions and 205 deletions

View File

@@ -0,0 +1,2 @@
lightning_notify_sats_received: disabled # or xmpp, email
xmpp_exchange_contacts_with_invitees: true

View File

@@ -62,6 +62,11 @@ Rails.application.configure do
outgoing_email_address = ENV.fetch('SMTP_FROM_ADDRESS', 'accounts@localhost')
outgoing_email_domain = Mail::Address.new(outgoing_email_address).domain
config.action_mailer.default_url_options = {
host: ENV['AKKOUNTS_DOMAIN'],
protocol: "https",
}
config.action_mailer.default_options = {
from: outgoing_email_address,
message_id: -> { "<#{Mail.random_tag}@#{outgoing_email_domain}>" },

View File

@@ -186,13 +186,13 @@ Devise.setup do |config|
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
config.remember_for = 2.weeks
# Invalidates all the remember me tokens when the user signs out.
config.expire_all_remember_me_on_sign_out = true
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
config.extend_remember_period = true
# Options to be passed to the created cookie. For instance, you can set
# secure: true in order to force SSL only cookies.
@@ -210,7 +210,7 @@ Devise.setup do |config|
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again. Default is 30 minutes.
# config.timeout_in = 30.minutes
config.timeout_in = 30.minutes
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.

View File

@@ -0,0 +1,9 @@
if ENV["SENTRY_DSN"].present?
Sentry.init do |config|
config.dsn = ENV["SENTRY_DSN"]
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
config.traces_sampler = lambda do |context|
true
end
end
end

View File

@@ -0,0 +1,5 @@
require_relative "../../app/models/setting"
Sidekiq.configure_server do |config|
config.redis = { url: Setting.redis_url }
end

View File

@@ -1,7 +1,7 @@
require 'sidekiq/web'
Rails.application.routes.draw do
devise_for :users, :controllers => { :confirmations => "users/confirmations" }
devise_for :users, controllers: { confirmations: "users/confirmations" }
get 'welcome', to: 'welcome#index'
get 'check_your_email', to: 'welcome#check_your_email'
@@ -10,13 +10,6 @@ Rails.application.routes.draw do
match 'signup/:step', to: 'signup#steps', as: :signup_steps, via: [:get, :post]
post 'signup_validate', to: 'signup#validate'
namespace :settings do
get 'profile', to: 'profile#index'
post 'profile', to: 'profile#update'
get 'account', to: 'account#index'
post 'reset_password', to: 'account#reset_password'
end
namespace :contributions do
root to: 'donations#index'
get 'projects', to: 'projects#index'
@@ -28,6 +21,12 @@ Rails.application.routes.draw do
get 'wallet', to: 'wallet#index'
get 'wallet/transactions', to: 'wallet#transactions'
resources :settings, param: 'section', only: ['index', 'show', 'update'] do
collection do
post 'reset_password'
end
end
get 'lnurlpay/:address', to: 'lnurlpay#index',
as: 'lightning_address', constraints: { address: /[^\/]+/}
get 'lnurlpay/:address/invoice', to: 'lnurlpay#invoice',
@@ -60,6 +59,9 @@ Rails.application.routes.draw do
get 'oauth/token/:id/launch_app' => 'oauth#launch_app', as: :launch_app
end
get ".well-known/webfinger" => "webfinger#show"
authenticate :user, ->(user) { user.is_admin? } do
mount Sidekiq::Web => '/sidekiq'
end

View File

@@ -1,3 +1,4 @@
:concurrency: 2
:queues:
- default
- mailers