code: def user_can_delete_attachments(self):
          
          context = self.context
          user = api.get_current_user()
          if not self.is_ar_editable():
              return False
          return (self.user_can_add_attachments() and
                  not user.allowed(context, ["Client"])) or \
              self.user_can_update_attachments()
docs: Checks if the current logged in user is allowed to delete attachments