Files
odoo_source/addons/mail/security/ir.model.access.csv
T
Tiffany Chang (tic) f9ff21a200 [IMP] mass_mailing_(sms): Add unblacklisting button
Previously a blacklisted phone number or email address could only be
removed from their respective blacklist by going to the corresponding
blacklist view [in mass_mailing_(sms)] and manually
archiving/deactiviting the entry. All users could see that an email was
blacklisted via an fa-ban icon added next to their corresponding field
in the modules: crm, mass_mailing, mass_mailing_sms, and contacts (via
extension).

This commit adds additional fa-ban icons next to blacklisted phone
numbers and makes all instances of these icons clickable to remove them
from their corresponding blacklist using a wizard. There are several
limitations to this implementation including:

1. If both a mobile and phone number field appear within a crm lead
instance, then only the mobile field will indicate if it is blacklisted
(due to current implementation of PhoneMixin which only checks 1 phone
value against the blacklist and "sms" which returns mobile numbers first).
I.e. if a phone field value is blacklisted, but a value is typed into the
mobile field, then the phone field will never indicate that it is blacklisted.

2. If someone clicks on a unblacklisting icon after changing the
corresponding field value without clicking off the field input, then the
latest typed in value will be the one submitted for unblacklisting,
which may not actually be blacklisted (due to "is_blacklisted" flag
being a computed field and it not having a chance to re-compute to hide
the button).

3. If someone changes values in the blacklist, then someone who already
has a form open will not see icon disappear until something triggers a
re-compute of the "phone_sanitized_blacklisted" flag (this was already the
case with the icon, but now a user may try to unblacklist a value that is
already unblacklisted.)

4. Since the icon needs to be visible by everyone to indicate whether or
not a phone/email is blacklisted, users without corresponding unblacklist
permissions will be able to click on the icon. When they click on it, they
will be informed they do not have permission to unblacklist. A wizard was
determined to be the best way to implement this unblacklisting for the
following reasons:
  - A "Unblacklisting Reason" is needed and will not be stored as a field.
  - A field widget is unable to do this due to security settings +
    inability to refresh view after unblacklisting with a
    "Unblacklisting Reason" without wiping unsaved changes.

Additionally, to better align with GDPR, the corresponding form view for
the phone/email blacklist has been updated to use the same wizard to
track "Reason for unblacklisting". Unfortunately there is no
straightforward way to prevent direct "Archive" action, so users are
still able to bypass unblacklisting without being asked for a "reason
for unblacklisting".

Supports task: 2117635
Upgrade PR: odoo/upgrade#939
COM PR: odoo/odoo#45315
2020-03-26 10:15:18 +00:00

4.5 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_mail_message_allmail.message.allmodel_mail_message1000
3access_mail_message_portalmail.message.portalmodel_mail_messagebase.group_portal1111
4access_mail_message_usermail.message.usermodel_mail_messagebase.group_user1111
5access_mail_mail_allmail.mail.allmodel_mail_mail0000
6access_mail_mail_portalmail.mail.portalmodel_mail_mailbase.group_portal0000
7access_mail_mail_usermail.mail.usermodel_mail_mailbase.group_user0000
8access_mail_mail_systemmail.mail.systemmodel_mail_mailbase.group_system1111
9access_mail_followers_allmail.followers.allmodel_mail_followers0000
10access_mail_followers_usermail.followers.usermodel_mail_followersbase.group_user1000
11access_mail_followers_systemmail.followers.systemmodel_mail_followersbase.group_system1111
12access_mail_notification_portalmail.notification.portalmodel_mail_notificationbase.group_portal1000
13access_mail_notification_usermail.notification.usermodel_mail_notificationbase.group_user1110
14access_mail_notification_systemmail.notification.systemmodel_mail_notificationbase.group_system1111
15access_mail_channel_allmail.group.allmodel_mail_channel1000
16access_mail_channel_usermail.group.usermodel_mail_channelbase.group_user1111
17access_mail_channel_partner_publicmail.channel.partner.publicmodel_mail_channel_partnerbase.group_public1000
18access_mail_channel_partner_portalmail.channel.partner.portalmodel_mail_channel_partnerbase.group_portal1111
19access_mail_channel_partner_usermail.channel.partner.usermodel_mail_channel_partnerbase.group_user1111
20access_mail_moderation_usermail.moderation.usermodel_mail_moderationbase.group_user1111
21access_mail_alias_allmail.alias.allmodel_mail_alias1000
22access_mail_alias_usermail.alias.usermodel_mail_aliasbase.group_user1111
23access_mail_alias_systemmail.alias.systemmodel_mail_aliasbase.group_system1111
24access_mail_message_subtype_allmail.message.subtype.allmodel_mail_message_subtype1000
25access_mail_message_subtype_usermail.message.subtype.usermodel_mail_message_subtypebase.group_user1111
26access_mail_tracking_value_allmail.tracking.value.allmodel_mail_tracking_value0000
27access_mail_tracking_value_portalmail.tracking.value.portalmodel_mail_tracking_valuebase.group_portal0000
28access_mail_tracking_value_usermail.tracking.value.usermodel_mail_tracking_valuebase.group_user0000
29access_mail_tracking_value_systemmail.tracking.value.systemmodel_mail_tracking_valuebase.group_system1111
30access_publisher_warranty_contract_allpublisher.warranty.contract.allmodel_publisher_warranty_contract1111
31access_mail_templatemail.templatemodel_mail_templatebase.group_user1110
32access_mail_template_systemmail.template_systemmodel_mail_templatebase.group_system1111
33access_mail_shortcodemail.shortcodemodel_mail_shortcodebase.group_user1111
34access_mail_shortcode_portalmail.shortcode.portalmodel_mail_shortcodebase.group_portal1000
35access_mail_activity_allmail.activity.allmodel_mail_activity0000
36access_mail_activity_usermail.activity.usermodel_mail_activitybase.group_user1111
37access_mail_activity_type_allmail.activity.type.allmodel_mail_activity_type0000
38access_mail_activity_type_usermail.activity.type.usermodel_mail_activity_typebase.group_user1000
39access_mail_activity_type_systemmail.activity.type.systemmodel_mail_activity_typebase.group_system1111
40access_mail_blacklist_systemaccess_mail_blacklist_systemmodel_mail_blacklistbase.group_system1111
41access_mail_wizard_inviteaccess.mail.wizard.invitemodel_mail_wizard_invitebase.group_user1110
42access_mail_compose_messageaccess.mail.compose.messagemodel_mail_compose_messagebase.group_user1110
43access_mail_compose_message_portalaccess.mail.compose.message.portalmodel_mail_compose_messagebase.group_portal1110
44access_mail_resend_cancelaccess.mail.resend.cancelmodel_mail_resend_cancelbase.group_user1110
45access_mail_resend_messageaccess.mail.resend.messagemodel_mail_resend_messagebase.group_user1110
46access_mail_resend_partneraccess.mail.resend.partnermodel_mail_resend_partnerbase.group_user1110
47access_mail_template_previewaccess.mail.template.previewmodel_mail_template_previewbase.group_user1110
48access_mail_blacklist_remove_systemacesss.mail.blacklist.remove.systemmodel_mail_blacklist_removebase.group_system1111