Check for additional bad user profile field names. bug #10941

This commit is contained in:
Colin Kuskie 2009-09-09 13:14:18 -07:00
parent 632e1e1ba2
commit f5b2b6d4cd
3 changed files with 7 additions and 4 deletions

View file

@ -30,6 +30,7 @@
- fixed #10862: Version tag contents page
- fixed #10943: ThingyRecord JS Broken
- added Subscribable AssetAspect to Wiki
- fixed #10941: New user profile fields with unfortunate names
7.7.19
- fixed #10838: Forwarded forum post email to new CS adds reply to original thread

View file

@ -67,7 +67,7 @@ Return true iff fieldName is reserved and therefore not usable as a profile fiel
sub isReservedFieldName {
my $class = shift;
my $fieldName = shift;
return isIn($fieldName, qw/userId func op wg_privacySettings/);
return isIn($fieldName, qw/userId shop specialState func op wg_privacySettings username authMethod dateCreated lastUpdated karma status referringAffiliate friendsGroup/);
}
#-------------------------------------------------------------------

View file

@ -33,7 +33,7 @@ WebGUI::Test->usersToDelete($newUser);
#----------------------------------------------------------------------------
# Tests
plan tests => 45; # Increment this number for each test you create
plan tests => 47; # Increment this number for each test you create
#----------------------------------------------------------------------------
# Test the creation of ProfileField
@ -135,8 +135,10 @@ ok( WebGUI::ProfileField->isReservedFieldName('op'), '... op');
ok( WebGUI::ProfileField->isReservedFieldName('userId'), '... userId');
ok( WebGUI::ProfileField->isReservedFieldName('wg_privacySettings'), '... wg_privacySettings');
ok( !WebGUI::ProfileField->isReservedFieldName('function'), '... function is not');
ok( !WebGUI::ProfileField->isReservedFieldName('operation'), '... operation is no');
ok( !WebGUI::ProfileField->isReservedFieldName('shop'), '... shop is not');
ok( !WebGUI::ProfileField->isReservedFieldName('operation'), '... operation is not');
ok( WebGUI::ProfileField->isReservedFieldName('shop'), '... shop is not');
ok( WebGUI::ProfileField->isReservedFieldName('username'), '... username');
ok( WebGUI::ProfileField->isReservedFieldName('status'), '... status');
###########################################################
#