Project

General

Profile

Bug #7767

Saving a privacy control via ajax with simple privacy enabled wipes out privacy rules

Added by krileon 13 days ago. Updated 12 days ago.

Status:
Resolved
Priority:
Immediate
Assignee:
Target version:
Start date:
06 November 2019
Due date:
% Done:

100%

Estimated time:

Description

If ajax editing a field with a privacy control and simple privacy is enabled it wipes out stored privacy rules. This appears to be due to the storage behavior trying to look for simple privacy rules instead of individual.

History

#1 Updated by krileon 12 days ago

This appears to be due to CB Core Fields Ajax firing a profile update trigger, which is only updating 1 field and thus only has output of 1 privacy rule. This however causes the privacy save behavior to fire for all fields. Field privacy likely needs to be moved to a different trigger that's more field specific.

#2 Updated by krileon 12 days ago

The save behavior should skip saving privacy controls with no rule being set. No rule being set means nothing exists in POST to even check to save and a rule MUST exist for the privacy control saving behavior otherwise it will wipe out the stored rules.

#3 Updated by krileon 12 days ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF