Title: Needs access controls
Last modified: February 14, 2020

---

# Needs access controls

 *  [Synetech](https://wordpress.org/support/users/synetech/)
 * (@synetech)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/needs-access-controls/)
 * This is good, but it definitely needs access controls, such as limiting the function
   to logged in users (not allowing anonymous users to post attachments), otherwise
   it’s just too risky too use.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Denis Yanchevskiy](https://wordpress.org/support/users/denisco/)
 * (@denisco)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/needs-access-controls/#post-12441432)
 * Hello [@synetech](https://wordpress.org/support/users/synetech/),
 * Thank you for the idea. I added it to the list of future enhancements.
 * At the moment, you can restrict uploading attachments for anonymous users using
   this snippet:
 *     ```
       if( ! is_user_logged_in() ) {
       	add_filter( 'dco_ca_disable_attachment_field', '__return_true');
       }
       ```
   
 *  [idasilver](https://wordpress.org/support/users/idasilver/)
 * (@idasilver)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/needs-access-controls/#post-12584646)
 * Agree with Synetech: risky to let anyone post any attachment. As I am not php-
   skilled: where (file, location) do I add the snippet given ?
    ( lol to me the
   snippet reads as disabling logged-in users from adding attachments)
    -  This reply was modified 6 years, 2 months ago by [idasilver](https://wordpress.org/support/users/idasilver/).
 *  Plugin Author [Denis Yanchevskiy](https://wordpress.org/support/users/denisco/)
 * (@denisco)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/needs-access-controls/#post-12677439)
 * Hello [@idasilver](https://wordpress.org/support/users/idasilver/),
 * For support requests, please create a new topic in [the support section](https://wordpress.org/support/plugin/dco-comment-attachment/#new-post).
 * > where (file, location) do I add the snippet given ?
 * You can add this snippet into functions.php file of your active theme or add 
   it in your custom plugin or use special plugins, such as, [Code Snippets](https://wordpress.org/plugins/code-snippets/).
 *  Plugin Author [Denis Yanchevskiy](https://wordpress.org/support/users/denisco/)
 * (@denisco)
 * [6 years ago](https://wordpress.org/support/topic/needs-access-controls/#post-12828881)
 * The feature for restrict uploading attachments only to logged users avaliable
   at version 1.3.0.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Needs access controls’ is closed to new replies.

 * ![](https://ps.w.org/dco-comment-attachment/assets/icon-256x256.png?rev=2082370)
 * [DCO Comment Attachment](https://wordpress.org/plugins/dco-comment-attachment/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dco-comment-attachment/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dco-comment-attachment/)
 * [Active Topics](https://wordpress.org/support/plugin/dco-comment-attachment/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dco-comment-attachment/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dco-comment-attachment/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Denis Yanchevskiy](https://wordpress.org/support/users/denisco/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/needs-access-controls/#post-12828881)