mirror of https://github.com/docusealco/docuseal
parent
dca4a705ce
commit
977a98a5da
@ -1,17 +1,5 @@
|
|||||||
Additional Terms
|
Additional Terms
|
||||||
|
|
||||||
In accordance with Section 7(b) of the GNU Affero General Public License,
|
In accordance with Section 7(b) of the GNU Affero General Public License,
|
||||||
covered works derived from this software must retain attribution to:
|
a covered work must retain the original DocuSeal attribution in interactive
|
||||||
|
user interfaces.
|
||||||
1. WaboSign — https://sign.wabo.cc — https://github.com/wabolabs/wabosign
|
|
||||||
2. DocuSeal (the upstream from which WaboSign is forked) —
|
|
||||||
https://github.com/docusealco/docuseal
|
|
||||||
|
|
||||||
Attribution must remain visible in interactive user interfaces (e.g. footer,
|
|
||||||
About page, generated emails, audit-trail PDFs, signing-completion screens).
|
|
||||||
|
|
||||||
WaboSign itself complies with this requirement by displaying both the
|
|
||||||
WaboSign and DocuSeal credits in the "Powered by" footer (see
|
|
||||||
app/views/shared/_powered_by.html.erb), in email attributions (see
|
|
||||||
app/views/shared/_email_attribution.html.erb), in generated PDF audit
|
|
||||||
trails, and in this repository's README and NOTICE files.
|
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
# Reporting a Vulnerability
|
# Reporting a Vulnerability
|
||||||
|
|
||||||
If you discover a security concern or vulnerability in WaboSign, please report it privately by email to **wabosign@wabo.cc** rather than opening a public GitHub issue. We will acknowledge receipt, work with you to validate the report, and ship a fix.
|
If you come across any security concern or vulnarability, please report the information via email to security@wabosign.com instead of opening a GitHub issue. We will promptly respond and will collaborate with you to validate the issue, and resolve it ASAP.
|
||||||
|
|
||||||
## Out of scope
|
**We have a bug bounty program to reward security researchers.**
|
||||||
|
|
||||||
|
Out of scope vulnerabilities:
|
||||||
|
|
||||||
- CSRF
|
- CSRF
|
||||||
- DNSSEC, CAA, CSP headers
|
- DNSSEC, CAA, CSP headers
|
||||||
- DNS or email security related
|
- DNS or email security related
|
||||||
- Rate limiting
|
- Rate Limiting
|
||||||
|
|
||||||
We reserve the right to classify any reported issue as out of scope.
|
Note: We reserve the right to classify any reported vulnerability as out of scope for the bug bounty program.
|
||||||
|
|||||||
@ -0,0 +1,26 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class ConsoleRedirectController < ApplicationController
|
||||||
|
skip_before_action :authenticate_user!
|
||||||
|
skip_authorization_check
|
||||||
|
|
||||||
|
def index
|
||||||
|
if request.path == '/upgrade'
|
||||||
|
params[:redir] = Wabosign.multitenant? ? "#{Wabosign::CONSOLE_URL}/plans" : "#{Wabosign::CONSOLE_URL}/on_premises"
|
||||||
|
end
|
||||||
|
|
||||||
|
params[:redir] = "#{Wabosign::CONSOLE_URL}/manage" if request.path == '/manage'
|
||||||
|
|
||||||
|
return redirect_to(new_user_session_path({ redir: params[:redir] }.compact)) if true_user.blank?
|
||||||
|
|
||||||
|
auth = JsonWebToken.encode(uuid: true_user.uuid,
|
||||||
|
scope: :console,
|
||||||
|
exp: 1.minute.from_now.to_i)
|
||||||
|
|
||||||
|
redir_uri = Addressable::URI.parse(params[:redir])
|
||||||
|
path = redir_uri.path if params[:redir].to_s.starts_with?(Wabosign::CONSOLE_URL)
|
||||||
|
|
||||||
|
redirect_to "#{Wabosign::CONSOLE_URL}#{path}?#{{ **redir_uri&.query_values, 'auth' => auth }.to_query}",
|
||||||
|
allow_other_host: true
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class EnquiriesController < ApplicationController
|
||||||
|
skip_before_action :authenticate_user!
|
||||||
|
skip_authorization_check
|
||||||
|
|
||||||
|
def create
|
||||||
|
if params[:talk_to_sales] == 'on'
|
||||||
|
Faraday.post(Wabosign::ENQUIRIES_URL,
|
||||||
|
enquiry_params.merge(type: :talk_to_sales).to_json,
|
||||||
|
'Content-Type' => 'application/json')
|
||||||
|
end
|
||||||
|
|
||||||
|
head :ok
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def enquiry_params
|
||||||
|
params.require(:user).permit(:email)
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class NewslettersController < ApplicationController
|
||||||
|
skip_authorization_check
|
||||||
|
|
||||||
|
def show; end
|
||||||
|
|
||||||
|
def update
|
||||||
|
Faraday.post(Wabosign::NEWSLETTER_URL, newsletter_params.to_json, 'Content-Type' => 'application/json')
|
||||||
|
rescue StandardError => e
|
||||||
|
Rails.logger.error(e)
|
||||||
|
ensure
|
||||||
|
redirect_to root_path
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def newsletter_params
|
||||||
|
params.require(:user).permit(:email)
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -1,67 +1,16 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class SmsSettingsController < ApplicationController
|
class SmsSettingsController < ApplicationController
|
||||||
SECRET_KEYS = %w[basic_auth_token twilio_auth_token voipms_api_password signalwire_api_token].freeze
|
|
||||||
|
|
||||||
before_action :load_encrypted_config
|
before_action :load_encrypted_config
|
||||||
authorize_resource :encrypted_config, only: :index
|
authorize_resource :encrypted_config, only: :index
|
||||||
authorize_resource :encrypted_config, parent: false, only: %i[create test_message]
|
authorize_resource :encrypted_config, parent: false, except: :index
|
||||||
|
|
||||||
def index; end
|
def index; end
|
||||||
|
|
||||||
def create
|
|
||||||
new_value = build_sms_value
|
|
||||||
|
|
||||||
if @encrypted_config.update(value: new_value)
|
|
||||||
redirect_to settings_sms_path, notice: I18n.t('changes_have_been_saved')
|
|
||||||
else
|
|
||||||
render :index, status: :unprocessable_content
|
|
||||||
end
|
|
||||||
rescue StandardError => e
|
|
||||||
flash[:alert] = e.message
|
|
||||||
render :index, status: :unprocessable_content
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_message
|
|
||||||
to = params[:phone].to_s.strip
|
|
||||||
if to.blank?
|
|
||||||
flash[:alert] = 'Enter a phone number to test against.'
|
|
||||||
return redirect_to(settings_sms_path)
|
|
||||||
end
|
|
||||||
|
|
||||||
Sms.send_message(account: current_account,
|
|
||||||
to: to,
|
|
||||||
text: "Test SMS from #{Wabosign.branded_product_name(current_account)}.")
|
|
||||||
|
|
||||||
redirect_to settings_sms_path, notice: "Test SMS dispatched to #{to}."
|
|
||||||
rescue Sms::Error => e
|
|
||||||
redirect_to settings_sms_path, alert: "Test failed: #{e.message}"
|
|
||||||
rescue StandardError => e
|
|
||||||
redirect_to settings_sms_path, alert: "Unexpected error: #{e.message}"
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def load_encrypted_config
|
def load_encrypted_config
|
||||||
@encrypted_config =
|
@encrypted_config =
|
||||||
EncryptedConfig.find_or_initialize_by(account: current_account,
|
EncryptedConfig.find_or_initialize_by(account: current_account, key: 'sms_configs')
|
||||||
key: EncryptedConfig::SMS_CONFIGS_KEY)
|
|
||||||
end
|
|
||||||
|
|
||||||
def build_sms_value
|
|
||||||
submitted = params.require(:encrypted_config).permit(value: {})[:value].to_h
|
|
||||||
existing = @encrypted_config.value || {}
|
|
||||||
|
|
||||||
# Password fields are rendered without their saved value, so an unedited
|
|
||||||
# submit posts back an empty string. Preserve the saved secret in that case
|
|
||||||
# so users can edit unrelated fields without re-pasting credentials.
|
|
||||||
SECRET_KEYS.each do |key|
|
|
||||||
submitted[key] = existing[key] if submitted[key].to_s.empty?
|
|
||||||
end
|
|
||||||
|
|
||||||
submitted['enabled'] = submitted['enabled'].to_s == '1' || submitted['enabled'].to_s == 'true'
|
|
||||||
submitted['provider'] = (submitted['provider'].presence || 'bulkvs').to_s
|
|
||||||
|
|
||||||
submitted.compact
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -0,0 +1,27 @@
|
|||||||
|
import { target, targetable } from '@github/catalyst/lib/targetable'
|
||||||
|
|
||||||
|
export default targetable(class extends HTMLElement {
|
||||||
|
static [target.static] = [
|
||||||
|
'prompt',
|
||||||
|
'processing',
|
||||||
|
'logo'
|
||||||
|
]
|
||||||
|
|
||||||
|
connectedCallback () {
|
||||||
|
this.form.addEventListener('submit', this.onSubmit)
|
||||||
|
}
|
||||||
|
|
||||||
|
disconnectedCallback () {
|
||||||
|
this.form.removeEventListener('submit', this.onSubmit)
|
||||||
|
}
|
||||||
|
|
||||||
|
onSubmit = () => {
|
||||||
|
this.prompt.classList.add('hidden')
|
||||||
|
this.processing.classList.remove('hidden')
|
||||||
|
this.logo.classList.add('animate-bounce')
|
||||||
|
}
|
||||||
|
|
||||||
|
get form () {
|
||||||
|
return this.querySelector('form')
|
||||||
|
}
|
||||||
|
})
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<% if Wabosign.google_sso_enabled? %>
|
|
||||||
<div class="divider my-4 text-sm opacity-60"><%= t('or') %></div>
|
|
||||||
<div class="form-control">
|
|
||||||
<%= button_to user_google_oauth2_omniauth_authorize_path,
|
|
||||||
method: :post,
|
|
||||||
data: { turbo: false },
|
|
||||||
class: 'base-button !bg-white !text-base-content border border-base-300 flex items-center justify-center gap-2' do %>
|
|
||||||
<img src="/google_g.svg" alt="" width="20" height="20" class="w-5 h-5">
|
|
||||||
<span><%= t('sign_in_with_google') %></span>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<tr scope="row" class="group">
|
||||||
|
<td class="flex items-center space-x-1">
|
||||||
|
<%= svg_icon('discount_check_filled', class: 'w-6 h-6 text-green-500') %>
|
||||||
|
<span class="flex items-center">
|
||||||
|
<%= t('wabosign_trusted_signature') %>
|
||||||
|
<div class="tooltip ml-1" data-tip="<%= t('sign_documents_with_trusted_certificate_provided_by_docu_seal_your_documents_and_data_are_never_shared_with_docu_seal_p_d_f_checksum_is_provided_to_generate_a_trusted_signature') %>">
|
||||||
|
<%= svg_icon('circle_question', class: 'w-4 h-4 stroke-1') %>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<%= "#{Wabosign::CLOUD_URL}/sign_up?#{{ redir: "#{Wabosign::CONSOLE_URL}/on_premises" }.to_query}" %>" class="btn btn-neutral btn-sm text-white">
|
||||||
|
<%= t('unlock_with_docuseal_pro') %>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="tooltip" data-tip="<%= t('unlock_with_docuseal_pro') %>">
|
||||||
|
<%= button_to settings_esign_path, method: :put, params: { name: Wabosign::AATL_CERT_NAME }, class: 'btn btn-outline btn-neutral btn-xs whitespace-nowrap', title: t('make_default'), disabled: true do %>
|
||||||
|
<%= t('make_default') %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
@ -1,5 +1,4 @@
|
|||||||
<% brand = Wabosign.branded_product_name(signed_in? ? current_account : nil) %>
|
|
||||||
<title>
|
<title>
|
||||||
<%= content_for(:html_title) || (signed_in? ? brand : "#{brand} | Open Source Document Signing") %>
|
<%= content_for(:html_title) || (signed_in? ? 'WaboSign' : 'WaboSign | Open Source Document Signing') %>
|
||||||
</title>
|
</title>
|
||||||
<%= render 'shared/meta' %>
|
<%= render 'shared/meta' %>
|
||||||
|
|||||||
@ -0,0 +1,14 @@
|
|||||||
|
<div class="max-w-xl mx-auto px-2">
|
||||||
|
<h1 class="text-4xl font-bold text-center my-8">👨💻 <%= t('developer_newsletters') %></h1>
|
||||||
|
<%= form_for current_user, url: newsletter_path do |f| %>
|
||||||
|
<div class="form-control">
|
||||||
|
<%= f.email_field :email, placeholder: t('email'), required: true, class: 'base-input' %>
|
||||||
|
</div>
|
||||||
|
<div class="form-control mt-4">
|
||||||
|
<%= f.button button_title, class: 'base-button' %>
|
||||||
|
</div>
|
||||||
|
<div class="text-center mt-2">
|
||||||
|
<a href="/" class="link"><%= t('skip') %></a>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<%= render 'reminder_placeholder' %>
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
<div class="alert my-4">
|
||||||
|
<%= svg_icon('info_circle', class: 'w-6 h-6') %>
|
||||||
|
<div>
|
||||||
|
<p class="font-bold">
|
||||||
|
<%= t('unlock_with_docuseal_pro') %>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<%= t('send_automatic_email_reminders_to_your_recipients') %>
|
||||||
|
<br>
|
||||||
|
<a class="link font-medium" target="_blank" href="<%= Wabosign.multitenant? ? console_redirect_index_path(redir: "#{Wabosign::CONSOLE_URL}/plans") : "#{Wabosign::CLOUD_URL}/sign_up?#{{ redir: "#{Wabosign::CONSOLE_URL}/on_premises" }.to_query}" %>" data-turbo="false">
|
||||||
|
<%= t('learn_more') %>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -1,32 +1 @@
|
|||||||
<div class="space-y-4">
|
<%= render 'logo_placeholder' %>
|
||||||
<% if current_account.logo.attached? %>
|
|
||||||
<div class="flex items-center justify-between bg-base-200 rounded-xl p-4">
|
|
||||||
<div class="flex items-center gap-3">
|
|
||||||
<%= image_tag rails_blob_path(current_account.logo, disposition: 'inline'),
|
|
||||||
class: 'w-12 h-12 object-contain bg-white rounded',
|
|
||||||
alt: current_account.name %>
|
|
||||||
<span class="text-sm opacity-70"><%= current_account.logo.filename %></span>
|
|
||||||
</div>
|
|
||||||
<%= button_to 'Remove', settings_account_logo_path, method: :delete,
|
|
||||||
class: 'btn btn-sm btn-outline btn-error',
|
|
||||||
data: { turbo_confirm: 'Remove the uploaded logo?' } %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= form_with url: settings_account_logo_path, method: :post,
|
|
||||||
multipart: true, html: { class: 'space-y-3', autocomplete: 'off' } do %>
|
|
||||||
<div class="form-control">
|
|
||||||
<label class="label" for="logo_file">
|
|
||||||
<span class="label-text">Upload logo (PNG, JPEG, or SVG · up to 2 MB)</span>
|
|
||||||
</label>
|
|
||||||
<input type="file" name="logo" id="logo_file" required
|
|
||||||
accept="image/png,image/jpeg,image/svg+xml"
|
|
||||||
class="file-input file-input-bordered w-full">
|
|
||||||
</div>
|
|
||||||
<button type="submit" class="base-button">Upload</button>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<p class="text-sm opacity-70">
|
|
||||||
Replaces the default WaboSign mark on the sign-in page, signing flow, dashboard navbar, share-link QR page, and audit-trail PDFs. Browser favicons and the PWA manifest icon stay on the default brand.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|||||||
@ -0,0 +1,15 @@
|
|||||||
|
<div class="alert my-4">
|
||||||
|
<%= svg_icon('info_circle', class: 'w-6 h-6') %>
|
||||||
|
<div>
|
||||||
|
<p class="font-bold">
|
||||||
|
<%= t('unlock_with_docuseal_pro') %>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<%= t('display_your_company_name_and_logo_when_signing_documents') %>
|
||||||
|
<br>
|
||||||
|
<a class="link font-medium" target="_blank" href="<%= Wabosign.multitenant? ? console_redirect_index_path(redir: "#{Wabosign::CONSOLE_URL}/plans") : "#{Wabosign::CLOUD_URL}/sign_up?#{{ redir: "#{Wabosign::CONSOLE_URL}/on_premises" }.to_query}" %>" data-turbo="false">
|
||||||
|
<%= t('learn_more') %>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -1 +1 @@
|
|||||||
<%= render 'shared/powered_by', with_counter: local_assigns[:with_counter], link_path: local_assigns[:link_path], account: local_assigns[:account] %>
|
<%= render 'shared/powered_by', with_counter: local_assigns[:with_counter], link_path: local_assigns[:link_path] %>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<a target="_blank" href="<%= Wabosign::GITHUB_URL %>" rel="noopener noreferrer nofollow" class="relative flex items-center rounded-full px-2 py-0.5 text-xs leading-4 mt-1 text-base-content border border-base-300 tooltip tooltip-bottom" data-tip="Give a star on GitHub">
|
<a target="_blank" href="<%= Wabosign::GITHUB_URL %>" rel="noopener noreferrer nofollow" class="relative flex items-center rounded-full px-2 py-0.5 text-xs leading-4 mt-1 text-base-content border border-base-300 tooltip tooltip-bottom" data-tip="Give a star on GitHub">
|
||||||
<span class="flex items-center justify-between space-x-0.5 font-medium">
|
<span class="flex items-center justify-between space-x-0.5 font-medium">
|
||||||
<%= svg_icon('start', class: 'h-3 w-3') %>
|
<%= svg_icon('start', class: 'h-3 w-3') %>
|
||||||
<span>16k</span>
|
<span>17k</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
<a href="<%= Wabosign::GITHUB_URL %>" class="btn btn-neutral btn-sm btn-outline inline-flex items-center justify-center" target="_blank" alt="Star on GitHub" style="height: 37px">
|
<a href="https://github.com/wabolabs/wabosign" class="btn btn-neutral btn-sm btn-outline inline-flex items-center justify-center" target="_blank" alt="Star on GitHub" style="height: 37px">
|
||||||
<span>
|
<span>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||||
<path fill="currentColor" d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
|
<path fill="currentColor" d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<span class="flex">
|
<span class="flex">
|
||||||
<span class="hidden lg:block">View on </span>GitHub
|
<span class="hidden lg:block">Star on </span>GitHub
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 4.8 KiB |
@ -1,3 +1,8 @@
|
|||||||
<% if signed_in? && current_user != true_user %>
|
<% if signed_in? && current_user != true_user %>
|
||||||
<%= render 'shared/test_alert' %>
|
<%= render 'shared/test_alert' %>
|
||||||
|
<% elsif request.path.starts_with?('/settings') %>
|
||||||
|
<%= link_to "#{Wabosign::CLOUD_URL}/sign_up?#{{ redir: "#{Wabosign::CONSOLE_URL}/on_premises" }.to_query}", class: 'hidden md:inline-flex btn btn-warning btn-sm', data: { prefetch: false } do %>
|
||||||
|
<%= t('upgrade') %>
|
||||||
|
<% end %>
|
||||||
|
<span class="hidden md:inline-flex h-3 border-r border-base-content"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
<%= render 'shared/account_logo', account: current_account %>
|
<%= render 'shared/logo' %>
|
||||||
<span><%= Wabosign.branded_product_name(current_account) %></span>
|
<span>WaboSign</span>
|
||||||
|
|||||||
@ -0,0 +1,15 @@
|
|||||||
|
<div class="alert">
|
||||||
|
<%= svg_icon('info_circle', class: 'w-6 h-6') %>
|
||||||
|
<div>
|
||||||
|
<p class="font-bold">
|
||||||
|
<%= t('send_signature_requests_via_sms') %>
|
||||||
|
</p>
|
||||||
|
<p class="text-gray-700">
|
||||||
|
<%= t('unlock_with_docuseal_pro') %>
|
||||||
|
<br>
|
||||||
|
<a class="link font-medium" target="_blank" href="<%= Wabosign.multitenant? ? console_redirect_index_path(redir: "#{Wabosign::CONSOLE_URL}/plans") : "#{Wabosign::CLOUD_URL}/sign_up?#{{ redir: "#{Wabosign::CONSOLE_URL}/on_premises" }.to_query}" %>" data-turbo="false">
|
||||||
|
<%= t('learn_more') %>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
<div class="alert">
|
||||||
|
<%= svg_icon('info_circle', class: 'w-6 h-6') %>
|
||||||
|
<div>
|
||||||
|
<p class="font-bold">
|
||||||
|
<%= t('single_sign_on_with_saml_2_0') %>
|
||||||
|
</p>
|
||||||
|
<p class="text-gray-700">
|
||||||
|
<%= t('unlock_with_docuseal_pro') %>
|
||||||
|
<br>
|
||||||
|
<a class="link font-medium" target="_blank" href="<%= Wabosign.multitenant? ? console_redirect_index_path(redir: "#{Wabosign::CONSOLE_URL}/plans") : "#{Wabosign::CLOUD_URL}/sign_up?#{{ redir: "#{Wabosign::CONSOLE_URL}/on_premises" }.to_query}" %>" data-turbo="false">
|
||||||
|
<%= t('learn_more') %>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -1,81 +1,8 @@
|
|||||||
<div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0">
|
<div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0">
|
||||||
<%= render 'shared/settings_nav' %>
|
<%= render 'shared/settings_nav' %>
|
||||||
<div class="flex-grow max-w-xl mx-auto">
|
<div class="flex-grow max-w-xl mx-auto">
|
||||||
<h1 class="text-4xl font-bold mb-4">Google SSO</h1>
|
<h1 class="text-4xl font-bold mb-4">SAML SSO</h1>
|
||||||
|
<%= render 'placeholder' %>
|
||||||
<% creds = Wabosign.google_sso_credentials %>
|
|
||||||
<% value = @encrypted_config.value || {} %>
|
|
||||||
|
|
||||||
<% if creds[:source] == :env %>
|
|
||||||
<div class="alert mb-4">
|
|
||||||
<%= svg_icon('info_circle', class: 'w-6 h-6') %>
|
|
||||||
<div>
|
|
||||||
<p class="font-bold">Google SSO is configured via environment variables</p>
|
|
||||||
<p class="text-gray-700">
|
|
||||||
<code>GOOGLE_CLIENT_ID</code> and <code>GOOGLE_CLIENT_SECRET</code> are set on the running process, so ENV-driven configuration is in effect. ENV always takes precedence over anything saved on this page. Unset the env vars (and restart) to switch to the values configured here.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% elsif creds[:source] == :db %>
|
|
||||||
<div class="alert alert-success mb-4">
|
|
||||||
<%= svg_icon('discount_check_filled', class: 'w-6 h-6') %>
|
|
||||||
<div>
|
|
||||||
<p class="font-bold">Google SSO is enabled</p>
|
|
||||||
<p class="text-gray-700">
|
|
||||||
<% if creds[:allowed_domains].any? %>
|
|
||||||
Allowed Workspace domain<%= 's' if creds[:allowed_domains].size > 1 %>: <code><%= creds[:allowed_domains].join(', ') %></code>.
|
|
||||||
<% else %>
|
|
||||||
<strong>Warning:</strong> no domain allowlist is set. Any Google account can sign in.
|
|
||||||
<% end %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<div class="alert mb-4">
|
|
||||||
<%= svg_icon('info_circle', class: 'w-6 h-6') %>
|
|
||||||
<div>
|
|
||||||
<p class="font-bold">Google SSO is not configured</p>
|
|
||||||
<p class="text-gray-700">
|
|
||||||
Fill in your Google Cloud OAuth client details below. The OAuth redirect URI to register in <a href="https://console.cloud.google.com/apis/credentials" target="_blank" rel="noopener" class="link">Google Cloud Console</a> is
|
|
||||||
<code><%= begin
|
|
||||||
"#{root_url}auth/google_oauth2/callback"
|
|
||||||
rescue StandardError
|
|
||||||
'/auth/google_oauth2/callback'
|
|
||||||
end %></code>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= form_for @encrypted_config, url: settings_sso_index_path, method: :post, html: { autocomplete: 'off', class: 'space-y-4' } do |f| %>
|
|
||||||
<%= f.fields_for :value do |ff| %>
|
|
||||||
<div class="form-control">
|
|
||||||
<label class="label cursor-pointer" for="encrypted_config_value_enabled">
|
|
||||||
<span class="label-text font-medium">Enable Google SSO</span>
|
|
||||||
<%= ff.check_box :enabled, { class: 'toggle', checked: value['enabled'] == true }, '1', '0' %>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-control">
|
|
||||||
<%= ff.label :client_id, 'Client ID', class: 'label' %>
|
|
||||||
<%= ff.text_field :client_id, value: value['client_id'], class: 'base-input', placeholder: '1234567890.apps.googleusercontent.com' %>
|
|
||||||
</div>
|
|
||||||
<div class="form-control">
|
|
||||||
<%= ff.label :client_secret, 'Client Secret', class: 'label' %>
|
|
||||||
<%= ff.password_field :client_secret, class: 'base-input', placeholder: value['client_secret'].present? ? '*************' : 'GOCSPX-…' %>
|
|
||||||
<% if value['client_secret'].present? %>
|
|
||||||
<span class="label-text-alt mt-1 opacity-70">Leave blank to keep the saved secret.</span>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<div class="form-control">
|
|
||||||
<%= ff.label :allowed_domains_csv, 'Allowed Workspace Domains', class: 'label' %>
|
|
||||||
<%= ff.text_field :allowed_domains_csv, value: Array(value['allowed_domains']).join(', '), class: 'base-input', placeholder: 'wabo.cc, partner.example' %>
|
|
||||||
<span class="label-text-alt mt-1 opacity-70">Comma-separated. Only Google accounts whose Workspace <code>hd</code> claim matches one of these domains can sign in. Leave blank to allow any Google account (not recommended).</span>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<div class="form-control pt-2">
|
|
||||||
<%= f.button button_title(title: t('save'), disabled_with: t('saving')), class: 'base-button' %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="w-0 md:w-52"></div>
|
<div class="w-0 md:w-52"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
<%= render 'start_form/brand_logo' %>
|
<%= render 'start_form/wabosign_logo' %>
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
<a href="/" class="flex justify-center items-center">
|
||||||
|
<span class="mr-3">
|
||||||
|
<%= render 'shared/logo', width: '50px', height: '50px' %>
|
||||||
|
</span>
|
||||||
|
<h1 class="text-5xl font-bold text-center">WaboSign</h1>
|
||||||
|
</a>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue