Title: Restrict &#8220;Export&#8221; for users with list_users capability
Last modified: September 13, 2026

---

# Restrict “Export” for users with list_users capability

 *  Resolved [bjorm5](https://wordpress.org/support/users/bjorm5/)
 * (@bjorm5)
 * [3 days, 16 hours ago](https://wordpress.org/support/topic/restrict-export-for-users-with-list_users-capability/)
 * I want to create a role for users to be able to Import only. They cannot View
   or Edit Users. They have the add_users capability only and do not have list_users.
   Can you restrict the Export tab and features to only users with list_users capability?

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

 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [3 days, 4 hours ago](https://wordpress.org/support/topic/restrict-export-for-users-with-list_users-capability/#post-19019397)
 * Hi,
 * Good news — this is now built into the plugin as of version 2.5, and your case
   is exactly why we changed it.
 * Previously, the Export tab and the Import tab shared the same permission check(`
   acui_capability`, default `create_users`). If you had already added a filter 
   to make it accept `add_users` so your import-only role could work, that same 
   filter was also opening up Export — there was no way to separate the two.
 * In 2.5, Export now has its own independent filter, `acui_export_capability`, 
   decoupled from `acui_capability`. By default it requires `edit_users` rather 
   than `list_users` — we went with `edit_users` because the CSV export can include
   arbitrary custom meta fields (addresses, phone numbers, etc.), not just the columns
   shown on the Users list screen, so `edit_users` (the capability WordPress itself
   uses to let someone open another user’s full profile) matches that level of data
   exposure more closely than `list_users` does.
 * That said, it’s fully filterable, so you can set it to exactly `list_users` as
   you asked:
 *     ```wp-block-code
       // Import: your role only needs add_users
       add_filter( 'acui_capability', function( $cap ) {
           return 'add_users';
       } );
   
       // Export: require list_users instead of the edit_users default
       add_filter( 'acui_export_capability', function( $cap ) {
           return 'list_users';
       } );
       ```
   
 * With that, your import-only role (with `add_users` but no `list_users`/`edit_users`)
   will be able to use Import, but the Export tab, its nav link, and the export/
   download endpoints will all be blocked for it — even if it somehow reaches the
   URL directly.
 * Let me know if you’d like a hand wiring this into your custom role setup.
 *  Thread Starter [bjorm5](https://wordpress.org/support/users/bjorm5/)
 * (@bjorm5)
 * [3 days, 2 hours ago](https://wordpress.org/support/topic/restrict-export-for-users-with-list_users-capability/#post-19019492)
 * Perfect, thank you!
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [3 days, 2 hours ago](https://wordpress.org/support/topic/restrict-export-for-users-with-list_users-capability/#post-19019504)
 * Thanks to you! If you like our plugin please rate us!
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [3 days, 2 hours ago](https://wordpress.org/support/topic/restrict-export-for-users-with-list_users-capability/#post-19019509)
 * Hahaha you did it! You are great, thanks again.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frestrict-export-for-users-with-list_users-capability%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/import-users-from-csv-with-meta/assets/icon-256x256.png?
   rev=1174343)
 * [Import and export users and customers](https://wordpress.org/plugins/import-users-from-csv-with-meta/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-users-from-csv-with-meta/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/)
 * [Active Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * Last activity: [3 days, 2 hours ago](https://wordpress.org/support/topic/restrict-export-for-users-with-list_users-capability/#post-19019509)
 * Status: resolved