diff --git a/app/controllers/sso_settings_controller.rb b/app/controllers/sso_settings_controller.rb new file mode 100644 index 00000000..9e90d1de --- /dev/null +++ b/app/controllers/sso_settings_controller.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class SsoSettingsController < ApplicationController + before_action :load_encrypted_config + authorize_resource :encrypted_config, only: :index + authorize_resource :encrypted_config, parent: false, except: :index + + def index; end + + private + + def load_encrypted_config + @encrypted_config = + EncryptedConfig.find_or_initialize_by(account: current_account, key: 'saml_configs') + end +end diff --git a/app/views/shared/_settings_nav.html.erb b/app/views/shared/_settings_nav.html.erb index 0f509d74..0feaeb8c 100644 --- a/app/views/shared/_settings_nav.html.erb +++ b/app/views/shared/_settings_nav.html.erb @@ -41,6 +41,13 @@ <%= link_to 'Team', settings_users_path, class: 'text-base hover:bg-base-300' %> <% end %> + <% unless Docuseal.multitenant? %> + <% if can?(:read, EncryptedConfig.new(key: 'saml_configs', account: current_account)) %> +
Single Sign On with SAML 2.0
+
+ Unlock with DocuSeal Enterprise
+
+ ">Learn More
+