mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
add cancan for authorization
This commit is contained in:
1 parent
f89c50d096
commit
2f1843151d
58 files changed
+341
-184
No files matched your search
@@ -1,12 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PersonalizationSettingsController < ApplicationController
|
||||
def show; end
|
||||
def show
|
||||
authorize!(:read, AccountConfig)
|
||||
end
|
||||
|
||||
def create
|
||||
account_config =
|
||||
current_account.account_configs.find_or_initialize_by(key: encrypted_config_params[:key])
|
||||
|
||||
authorize!(:create, account_config)
|
||||
|
||||
account_config.update!(encrypted_config_params)
|
||||
|
||||
redirect_back(fallback_location: settings_personalization_path, notice: 'Settings have been saved.')
|
||||
|
||||
Reference in new issue
Block a user