Making WordPress.org

Opened 8 years ago

Last modified 3 years ago

#2358 assigned enhancement

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

Reported by: lancewillett's profile lancewillett Owned by: pento's profile pento
Milestone: Q1 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 (7)

#1 @samuelsidler
8 years 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
8 years 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
8 years ago

  • Owner set to pento
  • Status changed from new to assigned

#4 @tellyworth
6 years ago

  • Milestone set to Q1

#5 @dd32
4 years ago

  • Milestone changed from Q1 to 2020 Q1

Milestone renamed

#6 @dd32
4 years ago

  • Milestone changed from 2020 Q1 to Q1

Milestone renamed

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.