add authorize

pull/721/head
Pete Matsyburka 2 weeks ago
parent ec04a95e36
commit e0b0d4e803

@ -23,6 +23,8 @@ class AccountsController < ApplicationController
unless Docuseal.multitenant? unless Docuseal.multitenant?
@encrypted_config = EncryptedConfig.find_or_initialize_by(account: current_account, @encrypted_config = EncryptedConfig.find_or_initialize_by(account: current_account,
key: EncryptedConfig::APP_URL_KEY) key: EncryptedConfig::APP_URL_KEY)
if can?(:manage, @encrypted_config)
@encrypted_config.assign_attributes(app_url_params) @encrypted_config.assign_attributes(app_url_params)
unless URI.parse(@encrypted_config.value.to_s).class.in?([URI::HTTP, URI::HTTPS]) unless URI.parse(@encrypted_config.value.to_s).class.in?([URI::HTTP, URI::HTTPS])
@ -35,6 +37,7 @@ class AccountsController < ApplicationController
Docuseal.refresh_default_url_options! Docuseal.refresh_default_url_options!
end end
end
with_locale do with_locale do
redirect_to settings_account_path, notice: I18n.t('account_information_has_been_updated') redirect_to settings_account_path, notice: I18n.t('account_information_has_been_updated')

Loading…
Cancel
Save