mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-04 21:02:35 +08:00
Allows contact managers to export and import contacts from the Contacts page while keeping plain agents blocked. The contacts action menu now mirrors backend permissions for both export and import. ## Closes - https://linear.app/chatwoot/issue/CW-4438/contact-export-is-broken ## What changed - Allows Enterprise custom roles with `contact_manage` to pass `ContactPolicy#export?` and `ContactPolicy#import?`. - Shows Export and Import to admins and contact managers only. - Adds Enterprise policy coverage for contact export and import. ## Screenshots Admin: Export and Import are available. <img width="3840" height="2160" alt="Admin contact actions with Export and Import visible" src="https://github.com/user-attachments/assets/2b2cdaf2-ca8f-470d-be34-31cba68b9dce" /> Contact manager: Export and Import are available. <img width="3840" height="2160" alt="Contact manager contact actions with Export and Import visible" src="https://github.com/user-attachments/assets/48fc038b-2e78-4d0c-ba17-a5965641bd88" /> Regular agent: Export and Import are hidden. <img width="3840" height="2160" alt="Regular agent contact actions with Export and Import hidden" src="https://github.com/user-attachments/assets/a63b5731-743a-4223-8dab-ce58383067fe" /> ## How to test - Sign in as an administrator and open Contacts; the action menu shows Export and Import. - Sign in as a custom-role user with `contact_manage`; the action menu shows Export and Import. - Sign in as a plain agent; Export and Import are not available and both APIs remain unauthorized. |
||
|---|---|---|
| .. | ||
| captain | ||
| account_policy.rb | ||
| agent_bot_policy.rb | ||
| application_policy.rb | ||
| article_policy.rb | ||
| assignment_policy_policy.rb | ||
| automation_rule_policy.rb | ||
| campaign_policy.rb | ||
| category_policy.rb | ||
| contact_policy.rb | ||
| conversation_policy.rb | ||
| csat_survey_response_policy.rb | ||
| custom_attribute_definition_policy.rb | ||
| custom_filter_policy.rb | ||
| hook_policy.rb | ||
| inbox_policy.rb | ||
| label_policy.rb | ||
| macro_policy.rb | ||
| portal_policy.rb | ||
| report_policy.rb | ||
| team_member_policy.rb | ||
| team_policy.rb | ||
| user_policy.rb | ||
| webhook_policy.rb | ||