mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
show archived shared templates
This commit is contained in:
1 parent
2840359396
commit
b2790776ef
8 files changed
+38
-13
No files matched your search
@@ -48,7 +48,7 @@ module Api
|
||||
|
||||
archived = params.key?(:archived) ? params[:archived] : params.dig(:template, :archived)
|
||||
|
||||
if archived.in?([true, false])
|
||||
if archived.in?([true, false]) && current_ability.can?(:destroy, @template)
|
||||
@template.archived_at = archived == true ? Time.current : nil
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user