mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
disable image upload for anonymous feedback
This commit is contained in:
@@ -58,7 +58,7 @@ class PostsController < ApplicationController
|
||||
@post.assign_attributes(post_create_params(is_anonymous: is_anonymous))
|
||||
|
||||
# handle attachments
|
||||
if Current.tenant.tenant_setting.allow_attachment_upload && params[:post][:attachments].present?
|
||||
if Current.tenant.tenant_setting.allow_attachment_upload && params[:post][:attachments].present? && !is_anonymous
|
||||
@post.attachments.attach(params[:post][:attachments])
|
||||
end
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ const NewPostForm = ({
|
||||
|
||||
{ /* Attachments */ }
|
||||
{
|
||||
tenantSetting.allow_attachment_upload &&
|
||||
tenantSetting.allow_attachment_upload && !isSubmissionAnonymous &&
|
||||
<div className="form-group">
|
||||
<Dropzone
|
||||
files={attachments}
|
||||
|
||||
Reference in New Issue
Block a user