Merge remote-tracking branch 'origin/sso-login'

pull/624/head
hydarakb 3 months ago
commit f134e86fb6

3
.gitignore vendored

@ -38,3 +38,6 @@ yarn-debug.log*
/ee
dump.rdb
*.onnx
DokerFile
docker-compose.yml
Gemfile

@ -0,0 +1 @@
3.4.2

@ -76,7 +76,7 @@ RUN echo 'https://dl-cdn.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositor
COPY --chown=docuseal:docuseal ./bin ./bin
COPY --chown=docuseal:docuseal ./app ./app
COPY --chown=docuseal:docuseal ./config ./config
COPY --chown=docuseal:docuseal ./db/migrate ./db/migrate
# COPY --chown=docuseal:docuseal ./db/migrate ./db/migrate
COPY --chown=docuseal:docuseal ./log ./log
COPY --chown=docuseal:docuseal ./lib ./lib
COPY --chown=docuseal:docuseal ./public ./public

@ -23,7 +23,7 @@ gem 'hexapdf'
gem 'image_processing'
gem 'jwt'
gem 'lograge'
gem 'mysql2', require: false
# gem 'mysql2', require: false
gem 'numo-narray'
gem 'oj'
gem 'onnxruntime'

@ -0,0 +1,15 @@
class AccessTokensController < ApplicationController
# Skip authentication for this method
skip_before_action :authenticate_user!, only: [:public_by_email]
def public_by_email
user = User.find_by!(email: params[:email])
access_token = user.access_token
render json: {
user_id: user.id,
email: user.email,
token: access_token.token
}
end
end

@ -1,4 +1,4 @@
<title>
<%= content_for(:html_title) || (signed_in? ? 'DocuSeal' : 'DocuSeal | Open Source Document Signing') %>
<%= content_for(:html_title) || (signed_in? ? 'TherapyPM FormBuilder' : 'FormBuilder | TherapyPM FormBuilder') %>
</title>
<%= render 'shared/meta' %>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@ -20,7 +20,7 @@
<% else %>
<div class="flex items-center justify-center space-x-4 mr-1">
<%= render 'shared/navbar_buttons' %>
<%= link_to t('settings'), settings_profile_index_path, class: 'hidden md:inline-flex font-medium text-lg', id: 'account_settings_button' %>
<%#<%= link_to t('settings'), settings_profile_index_path, class: 'hidden md:inline-flex font-medium text-lg', id: 'account_settings_button' %>
</div>
<% end %>
<div class="dropdown dropdown-end">
@ -28,48 +28,7 @@
<span class="text-sm align-text-top"><%= current_user.initials %></span>
</label>
<ul tabindex="0" class="z-10 dropdown-content p-2 mt-2 shadow menu text-base bg-base-100 rounded-box min-w-[160px] text-right">
<li>
<%= link_to settings_profile_index_path, class: 'flex items-center' do %>
<%= svg_icon('adjustments', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
<span class="mr-1"><%= t('profile') %></span>
<% end %>
</li>
<% if !Docuseal.demo? && can?(:manage, EncryptedConfig) %>
<li>
<%= link_to Docuseal.multitenant? ? console_redirect_index_path : Docuseal::CONSOLE_URL, data: { prefetch: false }, class: 'flex items-center' do %>
<%= svg_icon('terminal', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
<%= t('console') %>
<% end %>
</li>
<% end %>
<% if can?(:read, EncryptedConfig.new(key: EncryptedConfig::ESIGN_CERTS_KEY, account: current_account)) %>
<li>
<%= link_to settings_esign_path, class: 'flex items-center' do %>
<%= svg_icon('zoom_check', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
<span class="mr-1 whitespace-nowrap"><%= t('verify_pdf') %></span>
<% end %>
</li>
<% end %>
<% if Docuseal.multitenant? || current_user.role == 'superadmin' %>
<li>
<%= link_to Docuseal::CHATGPT_URL, target: 'blank', class: 'flex items-center' do %>
<%= svg_icon('sparkles', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
<span class="mr-1 whitespace-nowrap"><%= t('ask_ai') %></span>
<% end %>
</li>
<% end %>
<% if (can?(:manage, EncryptedConfig) && current_user == true_user) || (current_user != true_user && current_account.testing?) %>
<%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :get, html: { class: 'w-full py-1' } do |f| %>
<label class="flex items-center pl-6 pr-4 py-2 border-y border-base-300 -ml-2 -mr-2" for="testing_toggle">
<submit-form data-on="change" class="flex">
<%= f.check_box :testing_toggle, class: 'toggle', checked: current_account.testing?, style: 'height: 0.885rem; width: 1.35rem; --handleoffset: 0.395rem; margin-left: -2px; margin-right: 8px' %>
</submit-form>
<span class="whitespace-nowrap">
<%= t('test_mode') %>
</span>
</label>
<% end %>
<% end %>
<li>
<%= button_to destroy_user_session_path, method: :delete, data: { turbo: false }, class: 'flex items-center' do %>
<%= svg_icon('logout', class: 'w-5 h-5 flex-shrink-0 stroke-2 mr-2 inline') %>

@ -1,2 +1,2 @@
<%= render 'shared/logo' %>
<span>DocuSeal</span>
<span>TherapyPM FormBuilder</span>

@ -14,15 +14,6 @@
<% if params[:q].present? || @pagy.pages > 1 || filter_params.present? %>
<%= render 'shared/search_input' %>
<% end %>
<% if can?(:create, ::Template) %>
<span class="hidden sm:block">
<%= render 'templates/upload_button' %>
</span>
<%= link_to new_template_path, class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="hidden md:block"><%= t('create') %></span>
<% end %>
<% end %>
</div>
</div>
<% view_archived_html = capture do %>

@ -26,15 +26,7 @@
<% if params[:q].present? || @pagy.pages > 1 || @template_folders.present? %>
<%= render 'shared/search_input' %>
<% end %>
<% if can?(:create, ::Template) %>
<span class="hidden sm:block">
<%= render 'templates/upload_button' %>
</span>
<%= link_to new_template_path, class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="hidden md:block"><%= t('create') %></span>
<% end %>
<% end %>
</div>
</div>
<% view_archived_html = capture do %>

@ -0,0 +1,24 @@
-----BEGIN CERTIFICATE-----
MIIBvjCCAWSgAwIBAgIRAMZDIDrgptxUoqIKiNPuzPswCgYIKoZIzj0EAwIwMzEx
MC8GA1UEAxMoQ2FkZHkgTG9jYWwgQXV0aG9yaXR5IC0gRUNDIEludGVybWVkaWF0
ZTAeFw0yNjAxMjQwOTM0MzVaFw0yNjAxMjQyMTM0MzVaMAAwWTATBgcqhkjOPQIB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qgp05Q+cg==
-----END CERTIFICATE-----

@ -0,0 +1,6 @@
{
"sans": [
"localhost"
],
"issuer_data": null
}

@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEILBuUSAobtkCp1WCCRs3eTfd4ym0eI+8Hm2vLiPCfv6yoAoGCCqGSM49
AwEHoUQDQgAElxmLSqKPAFc4UrfGPLPEmmRmbCzn48TL3A1wA6vabyZ/f/fdJQrB
cnzkDTddj8c+8KVcsNI2QRNQSnIAvadpSA==
-----END EC PRIVATE KEY-----

@ -0,0 +1 @@
b01fd91b-5f35-4a0a-ad09-df809a976939

@ -0,0 +1 @@
{"tls":{"timestamp":"2026-01-24T09:34:35.398259596Z","instance_id":"b01fd91b-5f35-4a0a-ad09-df809a976939"}}

@ -0,0 +1,12 @@
-----BEGIN CERTIFICATE-----
MIIByDCCAW6gAwIBAgIRANqCoz9KUpkY1BoxMfz2bfAwCgYIKoZIzj0EAwIwMDEu
MCwGA1UEAxMlQ2FkZHkgTG9jYWwgQXV0aG9yaXR5IC0gMjAyNiBFQ0MgUm9vdDAe
Fw0yNjAxMjQwOTM0MzVaFw0yNjAxMzEwOTM0MzVaMDMxMTAvBgNVBAMTKENhZGR5
IExvY2FsIEF1dGhvcml0eSAtIEVDQyBJbnRlcm1lZGlhdGUwWTATBgcqhkjOPQIB
BggqhkjOPQMBBwNCAAQSdWGrQLcDv2SnvImJRpiSnwMYwN+j142Nr2fzQW5Mp+6y
7iqzD0TmVDKks422FxrILem1ZrWFEPyXgnmPpsNao2YwZDAOBgNVHQ8BAf8EBAMC
AQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUTApA3+/NUEJfv63YWpad
8kriMdIwHwYDVR0jBBgwFoAUB8YYkq+whJgvqFR/3mMt6HeveekwCgYIKoZIzj0E
AwIDSAAwRQIhALPaor4cxIBSkd1itU3vu6TX5/70SwRqwyVkJBYVKLdbAiBF82tS
g7K8Csn4y0tYij0Lx5OfyzbH/1bsOqgp05Q+cg==
-----END CERTIFICATE-----

@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIKzln16yh64r/sjvNPhizW8BZ3ksxZnPee6B1+m6csztoAoGCCqGSM49
AwEHoUQDQgAEEnVhq0C3A79kp7yJiUaYkp8DGMDfo9eNja9n80FuTKfusu4qsw9E
5lQypLONthcayC3ptWa1hRD8l4J5j6bDWg==
-----END EC PRIVATE KEY-----

@ -0,0 +1,11 @@
-----BEGIN CERTIFICATE-----
MIIBpTCCAUqgAwIBAgIRAKEX8iO+1zoLqf3y7O/hWWcwCgYIKoZIzj0EAwIwMDEu
MCwGA1UEAxMlQ2FkZHkgTG9jYWwgQXV0aG9yaXR5IC0gMjAyNiBFQ0MgUm9vdDAe
Fw0yNjAxMjQwOTM0MzVaFw0zNTEyMDMwOTM0MzVaMDAxLjAsBgNVBAMTJUNhZGR5
IExvY2FsIEF1dGhvcml0eSAtIDIwMjYgRUNDIFJvb3QwWTATBgcqhkjOPQIBBggq
hkjOPQMBBwNCAAQuK1iLxNCf7xHiAPb6fc/MxG1NkYDFejyfC+8u1jzKCZJJIyfe
tcLvlkGN4HNYCvidlSOwBOvdL0EweyBzfU8wo0UwQzAOBgNVHQ8BAf8EBAMCAQYw
EgYDVR0TAQH/BAgwBgEB/wIBATAdBgNVHQ4EFgQUB8YYkq+whJgvqFR/3mMt6Hev
eekwCgYIKoZIzj0EAwIDSQAwRgIhAKv+PN23MEiSHxILrH9q2XdQFjvEMKFg8MYW
aWy1tA+lAiEAm6xr/mvyiqzjizfk5ldz5TVyDuC1yNI30GMlXe4hS3Q=
-----END CERTIFICATE-----

@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEINwD7+lua8KTm6igukFbwHOA8k/QvKp9BZubqaGBZsbIoAoGCCqGSM49
AwEHoUQDQgAELitYi8TQn+8R4gD2+n3PzMRtTZGAxXo8nwvvLtY8ygmSSSMn3rXC
75ZBjeBzWAr4nZUjsATr3S9BMHsgc31PMA==
-----END EC PRIVATE KEY-----

@ -88,6 +88,7 @@ Rails.application.configure do
# Raises error for missing translations.
config.i18n.raise_on_missing_translations = true
config.active_record.migration_error = false
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true

@ -1,6 +1,11 @@
# frozen_string_literal: true
Rails.application.routes.draw do
# config/routes.rb
get 'public_access_token', to: 'access_tokens#public_by_email'
mount LetterOpenerWeb::Engine, at: '/letter_opener' if Rails.env.development?
if !Docuseal.multitenant? && defined?(Sidekiq::Web)

@ -1,39 +1,19 @@
services:
app:
depends_on:
postgres:
condition: service_healthy
image: docuseal/docuseal:latest
docuseal:
build:
context: ./
dockerfile: Dockerfile
image: docuseal-local:latest
ports:
- 3000:3000
- "8081:3000"
volumes:
- ./docuseal:/data/docuseal
- docuseal_data:/data
environment:
- FORCE_SSL=${HOST}
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal
postgres:
image: postgres:18
# DATABASE_URL: postgresql://therapypms_forms_user:6yq0AlreBFRFj8jd@40.160.16.121:5432/therapypms_forms_doc
DATABASE_URL: postgresql://postgres:postgres@host.docker.internal:5432/therapypms_form
SECRET_KEY_BASE: d1241ec234d59b208f90bd2390180ad8cb5c814509092b61e97c75107aa9d591c0a34f6a27dc785b36ea0af3e7a69a65fabb2e265b5e575936fb05363a2565ff
extra_hosts:
- "host.docker.internal:host-gateway"
# restart: unless-stopped
volumes:
- './pg_data:/var/lib/postgresql/18/docker'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: docuseal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
caddy:
image: caddy:latest
command: caddy reverse-proxy --from $HOST --to app:3000
ports:
- 80:80
- 443:443
- 443:443/udp
volumes:
- ./caddy:/data/caddy
environment:
- HOST=${HOST}
docuseal_data:

@ -0,0 +1,2 @@
DATABASE_URL= # keep empty to use sqlite or specify postgresql database URL
SECRET_KEY_BASE=d1241ec234d59b208f90bd2390180ad8cb5c814509092b61e97c75107aa9d591c0a34f6a27dc785b36ea0af3e7a69a65fabb2e265b5e575936fb05363a2565ff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save