WordPress.org

Making WordPress.org

Opened 17 months ago

Last modified 16 months ago

#2358 assigned enhancement

Make P2s: allow authors with existing moderated comments to upload files

Reported by: lancewillett Owned by: pento
Milestone: Priority: normal
Component: Make (Get Involved) / P2 Keywords: needs-patch
Cc:

Description

Especially relates to Make Flow and Make Mobile, where we're trying to encourage everyone to test, dogfood, and share visual records like screenshots and videos.

Right now if you aren't an editor on that particular Make P2, and you try to upload an image — say by dragging it on to the P2 comment form — you get an error like "Unknown file type passed" or something similar.

It's a dead end.

I know we should be aware of spam and abuse, but if we limit this to only users who have existing comments approved it would be a nice win.

Change History (3)

#1 @samuelsidler
17 months ago

@ocean90 fixed this up earlier. Any chance you'd be able to set this up? If we put it in a plugin, we can enable it per-site as well, which might be better for spam/abuse reasons.

#2 @ocean90
17 months ago

  • Keywords needs-patch added; 2nd-opinion removed

I've fixed displaying images in [dotorg12682]. Uploads were disabled in [3677] and [dotorg12181] by @jmdodd:

<?php
// Don't allow uploads unless user can upload_files
function restrict_o2_uploads( $args = array() ) {
        if ( ! current_user_can( 'upload_files' ) ) {
                return array( 'post', 'comment' );
        } else {
                return $args;
        }
}
add_filter( 'o2_supported_message_types', 'restrict_o2_uploads' );

I guess someone can make a plugin to improve this restriction based on other factors, like existing comments.

#3 @samuelsidler
16 months ago

  • Owner set to pento
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.