Opened 6 years ago
Closed 5 years ago
#1484498 closed Feature Requests (fixed)
Disabling "Multiple identities" feature in config
| Reported by: | Stormbringer | Owned by: | thomasb |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-beta |
| Component: | Core functionality | Version: | 0.1-rc1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Sometimes one may not want to allow "Multiple identities" for users.
It would be great to be able to disable "Personal settings > Identities" tab via config.
Change History (5)
comment:1 Changed 5 years ago by till
- Milestone set to 0.1.1
- Owner set to till
- Status changed from new to assigned
comment:2 Changed 5 years ago by till
Patch credit: Tapi
Thread: http://roundcubeforum.net/forum/index.php?topic=2245.0
comment:3 Changed 5 years ago by till
- Milestone changed from 0.1.1 to 0.2-beta
This is a great idea, but 0.1.1 is a bugfix release. Postponing it for now.
comment:4 Changed 5 years ago by thomasb
- Owner changed from till to thomasb
- Status changed from assigned to new
comment:5 Changed 5 years ago by thomasb
- Resolution set to fixed
- Status changed from new to closed
Added to trunk in [f645ce16]
Note: See
TracTickets for help on using
tickets.

Pasting a patch from the forum to completely remove "edit" and "delete":
diff -ru /home/tapi/roundcubemail-0.1-rc2/index.php roundcube2/index.php --- /home/tapi/roundcubemail-0.1-rc2/index.php 2007-10-20 23:51:51.000000000 +0200 +++ roundcube2/index.php 2007-10-30 00:51:36.000000000 +0100 @@ -355,12 +355,9 @@ if ($_action=='save-identity') include('program/steps/settings/save_identity.inc'); - if ($_action=='add-identity' || $_action=='edit-identity') + if ($_action=='edit-identity') include('program/steps/settings/edit_identity.inc'); - if ($_action=='delete-identity') - include('program/steps/settings/delete_identity.inc'); - if ($_action=='identities') include('program/steps/settings/identities.inc'); diff -ru /home/tapi/roundcubemail-0.1-rc2/program/js/app.js roundcube2/program/js/app.js --- /home/tapi/roundcubemail-0.1-rc2/program/js/app.js 2007-10-19 16:04:43.000000000 +0200 +++ roundcube2/program/js/app.js 2007-10-30 01:11:46.000000000 +0100 @@ -269,10 +269,10 @@ case 'settings': this.enable_command('preferences', 'identities', 'save', 'folders', true); - if (this.env.action=='identities' || this.env.action=='edit-identity' || this.env.action=='add-identity') - this.enable_command('edit', 'add', 'delete', true); + if (this.env.action=='identities' || this.env.action=='edit-identity') + this.enable_command('edit', true); - if (this.env.action=='edit-identity' || this.env.action=='add-identity') + if (this.env.action=='edit-identity') this.enable_command('save', true); if (this.env.action=='folders') @@ -591,11 +591,6 @@ case 'add': if (this.task=='addressbook') this.load_contact(0, 'add'); - else if (this.task=='settings') - { - this.identity_list.clear_selection(); - this.load_identity(0, 'add-identity'); - } break; case 'edit': @@ -649,9 +644,6 @@ // addressbook task else if (this.task=='addressbook') this.delete_contacts(); - // user settings task - else if (this.task=='settings') - this.delete_identity(); break; @@ -917,9 +909,6 @@ this.goto_url('identities'); break; - case 'delete-identity': - this.delete_identity(); - case 'folders': this.goto_url('folders'); break; @@ -2447,7 +2436,7 @@ document.getElementById(this.env.contentframe).style.visibility = 'inherit'; } - if (action && (id || action=='add-identity')) + if (action && id) { this.set_busy(true); target.location.href = this.env.comm_path+'&_action='+action+'&_iid='+id+add_url; @@ -2456,22 +2445,6 @@ }; - this.delete_identity = function(id) - { - // exit if no mailbox specified or if selection is empty - var selection = this.identity_list.get_selection(); - if (!(selection.length || this.env.iid)) - return; - - if (!id) - id = this.env.iid ? this.env.iid : selection[0]; - - // if (this.env.framed && id) - this.goto_url('delete-identity', '_iid='+id, true); - return true; - }; - - this.focus_subscription = function(id) { var row, folder; Only in /home/tapi/roundcubemail-0.1-rc2/program/steps/settings: delete_identity.inc diff -ru /home/tapi/roundcubemail-0.1-rc2/program/steps/settings/edit_identity.inc roundcube2/program/steps/settings/edit_identity.inc --- /home/tapi/roundcubemail-0.1-rc2/program/steps/settings/edit_identity.inc 2007-04-28 20:07:12.000000000 +0200 +++ roundcube2/program/steps/settings/edit_identity.inc 2007-10-30 01:21:16.000000000 +0100 @@ -59,7 +59,7 @@ "theme_advanced_buttons2 : 'link,unlink,code,forecolor,fontselect,fontsizeselect'," . "theme_advanced_buttons3 : '' });"); - if (!$IDENTITY_RECORD && $GLOBALS['_action']!='add-identity') + if (!$IDENTITY_RECORD) return rcube_label('notfound'); // add some labels to client @@ -72,13 +72,11 @@ // list of available cols $a_show_cols = array('name' => array('type' => 'text'), - 'email' => array('type' => 'text'), 'organization' => array('type' => 'text'), 'reply-to' => array('type' => 'text', 'label' => 'replyto'), 'bcc' => array('type' => 'text'), 'signature' => array('type' => 'textarea', 'size' => "40", 'rows' => "6"), - 'html_signature'=>array('type' => 'checkbox', 'label' => 'htmlsignature', 'onclick' => 'return rcmail.toggle_editor(this, \'_signature\');'), - 'standard' => array('type' => 'checkbox', 'label' => 'setdefault')); + 'html_signature'=>array('type' => 'checkbox', 'label' => 'htmlsignature', 'onclick' => 'return rcmail.toggle_editor(this, \'_signature\');')); // a specific part is requested @@ -137,8 +135,5 @@ $OUTPUT->add_handler('identityform', 'rcube_identity_form'); -if ($_action=='add-identity' && template_exists('addidentity')) - parse_template('addidentity'); - parse_template('editidentity'); ?> diff -ru /home/tapi/roundcubemail-0.1-rc2/program/steps/settings/save_identity.inc roundcube2/program/steps/settings/save_identity.inc --- /home/tapi/roundcubemail-0.1-rc2/program/steps/settings/save_identity.inc 2007-10-30 00:54:48.000000000 +0100 +++ roundcube2/program/steps/settings/save_identity.inc 2007-10-30 00:54:54.000000000 +0100 @@ -19,13 +19,13 @@ */ -$a_save_cols = array('name', 'email', 'organization', 'reply-to', 'bcc', 'standard', 'signature', 'html_signature'); +$a_save_cols = array('name', 'organization', 'reply-to', 'bcc', 'standard', 'signature', 'html_signature'); $a_html_cols = array('signature'); $a_boolean_cols = array('standard', 'html_signature'); $updated = $default_id = false; // check input -if (empty($_POST['_name']) || empty($_POST['_email'])) +if (empty($_POST['_name'])) { $OUTPUT->show_message('formincomplete', 'warning'); rcmail_overwrite_action('edit-identitiy'); Only in /home/tapi/roundcubemail-0.1-rc2/skins/default/templates: addidentity.html diff -ru /home/tapi/roundcubemail-0.1-rc2/skins/default/templates/editidentity.html roundcube2/skins/default/templates/editidentity.html --- /home/tapi/roundcubemail-0.1-rc2/skins/default/templates/editidentity.html 2005-11-06 23:43:39.000000000 +0100 +++ roundcube2/skins/default/templates/editidentity.html 2007-10-30 00:31:09.000000000 +0100 @@ -15,8 +15,6 @@ <div id="identities-list"> <roundcube:object name="itentitiesList" id="identities-table" class="records-table" cellspacing="0" summary="Identities list" editIcon="" /> -<p><roundcube:button command="add" type="input" label="newidentity" class="button" /></p> - <div id="identity-details"> <div id="identity-title"><roundcube:label name="edititem" /></div> @@ -24,7 +22,6 @@ <roundcube:object name="identityform" size="40" /> <p><br /> -<roundcube:button command="delete" type="input" class="button" label="delete" /> <roundcube:button command="save" type="input" class="button" label="save" /> </p> </div> diff -ru /home/tapi/roundcubemail-0.1-rc2/skins/default/templates/identities.html roundcube2/skins/default/templates/identities.html --- /home/tapi/roundcubemail-0.1-rc2/skins/default/templates/identities.html 2005-11-06 23:43:39.000000000 +0100 +++ roundcube2/skins/default/templates/identities.html 2007-10-29 15:01:17.000000000 +0100 @@ -14,7 +14,6 @@ <div id="identities-list"> <roundcube:object name="itentitiesList" id="identities-table" class="records-table" cellspacing="0" summary="Identities list" editIcon="" /> -<p><roundcube:button command="add" type="input" label="newidentity" class="button" /></p> </div> <roundcube:include file="/includes/settingscripts.html" />This doesn't mean that we do this, it more or less serves as a hint of where we need to check in the code for when we add a config hook.