Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#2302 closed enhancement (fixed)

Inline file upload should be controlled by configuration

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


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 18 years ago.
inline-up.diff (618 bytes) - added by doit-cu 18 years ago.
inline-uploading.diff (601 bytes) - added by doit-cu 18 years ago.
Corrected inline-up.diff

Download all attachments as: .zip

Change History (13)

#1 @skeltoac
18 years ago

  • 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."

#2 @davidhouse
18 years ago

  • 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.

#3 @davidhouse
18 years ago

  • 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.

18 years ago

#4 @doit-cu
18 years ago

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.

18 years ago

#5 @doit-cu
18 years ago

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

18 years ago

Corrected inline-up.diff

#6 @davidhouse
18 years ago

Oops, you're right. Apply both patches.

#7 @skeltoac
18 years ago

davidhouse I'm confused.

#8 @ryan
18 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

#9 @ryan
18 years ago

  • Milestone changed from 2.1 to 2.0.1

#10 @(none)
17 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.