mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -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,11 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class TemplatesRestoreController < ApplicationController
|
||||
load_and_authorize_resource :template
|
||||
|
||||
def create
|
||||
template = current_account.templates.find(params[:template_id])
|
||||
@template.update!(deleted_at: nil)
|
||||
|
||||
template.update!(deleted_at: nil)
|
||||
|
||||
redirect_to template_path(template), notice: 'Template has been unarchived'
|
||||
redirect_to template_path(@template), notice: 'Template has been unarchived'
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user