mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 23:42:32 -05:00
add authorize
This commit is contained in:
1 parent
ec04a95e36
commit
e0b0d4e803
1 file changed
+3
@@ -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')
|
||||||
|
|||||||
Reference in new issue
Block a user