If a user does not have privacy data for a field, check back with the field for the privacy default. Fixes bug #11951. Added ProfileField cleanup code.
This commit is contained in:
parent
9e714fa09a
commit
897c2e0248
4 changed files with 22 additions and 5 deletions
11
t/User.t
11
t/User.t
|
|
@ -22,7 +22,7 @@ use WebGUI::User;
|
|||
use WebGUI::ProfileField;
|
||||
use WebGUI::Shop::AddressBook;
|
||||
|
||||
use Test::More tests => 225; # increment this value for each test you create
|
||||
use Test::More tests => 226; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
use Data::Dumper;
|
||||
|
||||
|
|
@ -942,6 +942,15 @@ is($neighbor->getProfileFieldPrivacySetting('email'), 'none', '...set will not s
|
|||
is($admin->getProfileFieldPrivacySetting('publicEmail'), 'all', '...get on a user with existing settings');
|
||||
is($neighbor->getProfileFieldPrivacySetting('wg_privacySettings'), 'none', '...the privacy field always returns "none"');
|
||||
|
||||
my $recentProfileField = WebGUI::ProfileField->create($session, 'recentField', {
|
||||
fieldName => 'recentField',
|
||||
defaultPrivacySetting => 'all',
|
||||
visible => 1,
|
||||
label => 'recentField',
|
||||
});
|
||||
WebGUI::Test->addToCleanup($recentProfileField);
|
||||
is($neighbor->getProfileFieldPrivacySetting('recentField'), 'all', '...if a field is added and the user does not have privacy data for it, check the original field');
|
||||
|
||||
################################################################
|
||||
#
|
||||
# updateProfileFields
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue