diff -uNr e-smith-email-4.17.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/pseudonyms e-smith-email-4.17.0-VisibleInternalUI/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/pseudonyms
--- e-smith-email-4.17.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/pseudonyms 2007-06-28 14:42:04.000000000 +0200
+++ e-smith-email-4.17.0-VisibleInternalUI/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/pseudonyms 2007-06-28 14:41:55.000000000 +0200
@@ -72,6 +72,10 @@
Select account or group
+ SELECT_INTERNAL
+ Local network only
+
+
CLICK_TO_CREATE
Add pseudonym
diff -uNr e-smith-email-4.17.0/root/etc/e-smith/web/functions/pseudonyms e-smith-email-4.17.0-VisibleInternalUI/root/etc/e-smith/web/functions/pseudonyms
--- e-smith-email-4.17.0/root/etc/e-smith/web/functions/pseudonyms 2003-04-11 17:21:25.000000000 +0200
+++ e-smith-email-4.17.0-VisibleInternalUI/root/etc/e-smith/web/functions/pseudonyms 2007-06-27 17:20:07.000000000 +0200
@@ -159,6 +159,15 @@
+
+
+
+
diff -uNr e-smith-email-4.17.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/pseudonyms.pm e-smith-email-4.17.0-VisibleInternalUI/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/pseudonyms.pm
--- e-smith-email-4.17.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/pseudonyms.pm 2007-06-27 16:54:00.000000000 +0200
+++ e-smith-email-4.17.0-VisibleInternalUI/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/pseudonyms.pm 2007-06-27 17:20:07.000000000 +0200
@@ -29,6 +29,8 @@
print_begin_page
print_hidden_pseudonym_field
get_pseudonym_account
+ is_pseudonym_internal
+ is_pseudonym_not_removable
validate_new_pseudonym_name
validate_is_pseudonym
);
@@ -202,8 +204,17 @@
my $pseudonym = uri_unescape($q->param ('pseudonym'));
my $account = $q->param ('account');
+ my $internal = $q->param ('internal') || 'NO';
+ my $removable = $accounts->get($pseudonym)->prop('Removable') || 'yes';
- $accounts->get($pseudonym)->set_prop('Account', $account)
+ my %props = ('Account' => $account);
+
+ if ($removable eq 'yes') {
+ if ($internal eq "YES") { $props{'Visible'} = 'internal'; }
+ else { $accounts->get($pseudonym)->delete_prop('Visible'); }
+ }
+
+ $accounts->get($pseudonym)->set_prop(%props)
or $msg = "Error occurred while modifying pseudonym in database.";
# Untaint $pseudonym before use in system()
@@ -215,6 +226,7 @@
{
$q->delete('account');
$q->delete('pseudonym');
+ $q->delete('internal');
$fm->success('MODIFY_SUCCEEDED');
}
else
@@ -418,6 +430,42 @@
}
# }}}
+# {{{ is_pseudonym_not_removable
+
+=head2 is_pseudonym_not_removable
+
+Returns 1 if the current Account is not removable, 0 otherwise
+
+=cut
+
+sub is_pseudonym_not_removable {
+ my $fm = shift;
+ my $q = $fm->{'cgi'};
+ my $pseudonym = $q->param('pseudonym');
+ my $removable = $accounts->get($pseudonym)->prop('Removable') || 'yes';
+ return 1 if ($removable eq 'yes');
+ return 0;
+}
+# }}}
+
+# {{{ is_pseudonym_internal
+
+=head2 is_pseudonym_internal
+
+Returns YES if the current Account property Visible is 'internal'
+
+=cut
+
+sub is_pseudonym_internal {
+ my $fm = shift;
+ my $q = $fm->{'cgi'};
+ my $pseudonym = $q->param('pseudonym');
+ my $visible = $accounts->get($pseudonym)->prop('Visible') || '';
+ return 'YES' if ($visible eq 'internal');
+ return 'NO';
+}
+# }}}
+
# {{{ validate_new_pseudonym_name
=head2 validate_new_pseudonym_name FM PSEUDONYM