Better solution for managing media attachments with `wp_editor()`?

Yes the better solution is to use add_role( $role, $display_name, $capabilities ); and make a distinct role for the front end.

That way you have a separation of abilities that is easier to manage, the way you are doing it will lead to trouble.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)