Added the can_edit check to the upload media button

#571