Make WordPress Core

Opened 21 years ago

Closed 21 years ago

Last modified 20 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: Focuses:

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

Download all attachments as: .zip

Change History (13)

#1 @skeltoac
21 years ago

  • Keywords bg|2nd-opinion added
  • Milestone2.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
21 years ago

  • Owner changed from anonymous to davidhouse
  • Status newassigned

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

@davidhouse
21 years ago

#4 @doit-cu
21 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.

@doit-cu
21 years ago

#5 @doit-cu
21 years ago

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

@doit-cu
21 years ago

Corrected inline-up.diff

#6 @davidhouse
21 years ago

Oops, you're right. Apply both patches.

#7 @skeltoac
21 years ago

davidhouse I'm confused.

#8 @ryan
21 years ago

  • Resolutionfixed
  • Status assignedclosed

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

#9 @ryan
21 years ago

  • Milestone 2.12.0.1

#10 @(none)
20 years ago

  • Milestone 2.0.1

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.