mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 06: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,10 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class TemplatesArchivedController < ApplicationController
|
||||
def index
|
||||
templates = current_account.templates.where.not(deleted_at: nil).preload(:author).order(id: :desc)
|
||||
templates = Templates.search(templates, params[:q])
|
||||
load_and_authorize_resource :template, parent: false
|
||||
|
||||
@pagy, @templates = pagy(templates, items: 12)
|
||||
def index
|
||||
@templates = @templates.where.not(deleted_at: nil).preload(:author).order(id: :desc)
|
||||
@templates = Templates.search(@templates, params[:q])
|
||||
|
||||
@pagy, @templates = pagy(@templates, items: 12)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user