Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#2302 closed enhancement (fixed)

Inline file upload should be controlled by configuration

Reported by: doit-cu Owned by: davidhouse
Priority: normal Milestone:
Component: Administration Version: 2.0
Severity: normal Keywords: bg|2nd-opinion bg|has-patch
Cc:

Description

At a minimum, an administrator should be able to turn this on/off in the options section. I see there's already a current_user_can statement in inline-uploading.php, so it might be nice to handle it via some capabilities. Finally, it might be nice to control which MIME types can be uploaded via some interface, rather than hard coding them.

Attachments (3)

2302.diff (1.2 KB) - added by davidhouse 7 years ago.
inline-up.diff (618 bytes) - added by doit-cu 7 years ago.
inline-uploading.diff (601 bytes) - added by doit-cu 7 years ago.
Corrected inline-up.diff

Download all attachments as: .zip

Change History (13)

  • Keywords bg|2nd-opinion added
  • Milestone set to 2.1

Like so many other customizable features, this one will be used by such a tiny minority that it belongs in the realm of plugins.

Except perhaps a single checkbox for the administrator role: "Display the Upload interface on Write screens."

  • Owner changed from anonymous to davidhouse
  • Status changed from new to assigned

I'll definitely go with the cap, I'm less sold on the config option: I'll sit on the fence for that one. Drafting up a patch to add the cap.

  • Keywords bg|has-patch added

There already was a cap, upload_files, which I've used. Guess it was hanging around from the legacy upload code.

There's a slight bug in that approach- logged in users can still view inline-uploading.php directly by passing in action=whatever on the query string.

doit-cu7 years ago

Forgive me, I'm new to this. inline-up.diff is incorrect. inline-uploading.diff should be correct.

doit-cu7 years ago

Corrected inline-up.diff

Oops, you're right. Apply both patches.

davidhouse I'm confused.

comment:8   ryan7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3456]) Check upload_files cap for inline uploader. Props David House and doit-cu. fixes #2302

comment:9   ryan7 years ago

  • Milestone changed from 2.1 to 2.0.1
  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.