mirror of https://github.com/docusealco/docuseal
Fix remaining merge damage: restore Google SSO form, remove trusted signature row, GitHub stars, Discord/AI
- Restore Google SSO config form (from commit dacefffd UI, controller was intact)
- Restore 'Sign in with Google' button on sign-in page
- Delete _default_signature_row.html.erb (WaboSign Trusted Signature row — references
self-hosted PKCS infrastructure WaboSign doesn't provide)
- Fix esign_settings/show.html.erb — remove dangling render of deleted partial
- Delete _github.html.erb (hardcoded 17k DocuSeal stars)
- Remove GitHub stars render and dangling _github_button render from navbar
- Remove Discord Community and AI Assistant links from settings nav support channels
- Remove 27 unused locale keys (wabosign_trusted_signature, ai_assistant, discord_community,
sign_documents_with_trusted_certificate_... across 7 languages)
- Add comprehensive post-merge verification checklist to REBRANDING.md
pull/687/head
parent
9c464f54ab
commit
3d5f38304c
@ -0,0 +1,12 @@
|
||||
<% 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 %>
|
||||
@ -1,19 +0,0 @@
|
||||
<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></td>
|
||||
<td>
|
||||
<%= 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 %>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
@ -1,6 +0,0 @@
|
||||
<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">
|
||||
<%= svg_icon('start', class: 'h-3 w-3') %>
|
||||
<span>17k</span>
|
||||
</span>
|
||||
</a>
|
||||
@ -1,11 +0,0 @@
|
||||
<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">
|
||||
Configure SAML SSO via the <code>SAML_CONFIGS</code> environment variable or through the encrypted config.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,8 +1,77 @@
|
||||
<div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0">
|
||||
<%= render 'shared/settings_nav' %>
|
||||
<div class="flex-grow max-w-xl mx-auto">
|
||||
<h1 class="text-4xl font-bold mb-4">SAML SSO</h1>
|
||||
<%= render 'placeholder' %>
|
||||
<h1 class="text-4xl font-bold mb-4">Google SSO</h1>
|
||||
|
||||
<% 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><%= "#{root_url}auth/google_oauth2/callback" rescue '/auth/google_oauth2/callback' %></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 class="w-0 md:w-52"></div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in new issue