add authorization checks

This commit is contained in:
Pete Matsyburka committed 2026-05-16 08:15:01 +03:00
1 parent 755decca27
commit e52830c9b4
7 files changed
+14

No files matched your search

@@ -10,6 +10,8 @@ class TemplateDocumentsController < ApplicationController
end
def create
authorize!(:update, @template)
if params[:blobs].blank? && params[:files].blank?
return render json: { error: I18n.t('file_is_missing') }, status: :unprocessable_content
end