Opened 3 years ago

Closed 3 years ago

#1486773 closed Feature Requests (fixed)

Remove/disable identities_level check in squirrelmail_usercopy

Reported by: aberglund Owned by:
Priority: 5 Milestone: 0.4-stable
Component: Plugins Version: 0.4-beta
Severity: normal Keywords:
Cc:

Description (last modified by alec)

In 3717 (and earlier as well), the virtuser_file plugin does not work if email addresses are set to be not editable by the users in the identity settings. But it does work as intended if the "identities_level" param allows email addresses to be end-user editable. So with

=========
// Set identities access level:
// 0 - many identities with possibility to edit all params
// 1 - many identities with possibility to edit all params but not email address
// 2 - one identity with possibility to edit all params
// 3 - one identity with possibility to edit all params but not email address
$rcmail_config['identities_level'] = ?;
=========

set to either '0' or '2', it works. But if set to '1' or '3' it does not. I think this plugin used to work regardless of the identities_level setting, but could be wrong.

It seems to me that this plugin should be able to correctly populate the address field upon user creation regardless of the identities_level setting. If we aren't trusting the user to enter the address there, we really need a way to auto-populate it.

Change History (7)

comment:1 Changed 3 years ago by alec

  • Component changed from Addressbook to Plugins
  • Description modified (diff)
  • Milestone changed from later to 0.4-stable

comment:2 Changed 3 years ago by alec

I don't understand this issue. Are you using new_user_dialog? Try to disable all plugins first, then test with virtuser_file alone, then add new_user_dialog. Steps to reproduce needed.

comment:3 Changed 3 years ago by aberglund

Alec, please close this ticket, or change it to target the squirrelmail_usercopy plugin instead.

Further testing on individual plugins one at a time to document the error has not shown the problem to be repeatable for virtuser_file. Indeed, it appears that the problem I described appears to actually be in the squirrelmail_usercopy plugin, while the virtuser_file plugin does not appear to be working for me at all.

Our IMAP server serves 14 virtual domains, none of which is the domain of the server itself. Therefore email addresses can not be constructed as [username]@[server_domain], they must be read from either a virtuser file or from existing squirrelmail prefs. The squirrelmail method is important during our migration from squirrel to RC next month, later for new users I will need to have virtuser_file working too.

To see the issue with squirrelmail_usercopy, do the following:

Fresh SVN copy (today using 3738).

New unpopulated database, initialized by

mysql rctest < SQL/mysql.initial.sql

Set the following:

$rcmail_config['identities_level'] = 2;

and no plugins other than

$rcmail_config['plugins'] = array('squirrelmail_usercopy');

New user logs in, and all relevant data from squirrelmail is copied over - Display name, correct email address, signature and personal addressbook.

Now clear the database,

mysqladmin drop rctest
mysqladmin create rctest
mysql rctest < SQL/mysql.initial.sql

and change the identities param in main.inc.php

$rcmail_config['identities_level'] = 3;

Login as same user. All the same info from squirrelmail is copied over EXCEPT the email address. The address is constructed as [username]@[server_domain] instead, which is not user-editable.

comment:4 Changed 3 years ago by aberglund

I checked into the code in squirrelmail_usercopy and found that this behavior is intentional. I don't agree with doing it this way, because we have need for the email address to be correctly populated but can't allow the users to edit it later. In squirrelmail we used the retrieveuserdata plugin to populate the address, and did not allow the users to change it later. We were hoping to be able to do the same with RC. But now that I know this is normal I can work around it for our situation.

comment:5 follow-up: Changed 3 years ago by alec

  • Summary changed from virtuser_file plugin does not work if email addresses are set to not editable to Remove/disable identities_level check in squirrelmail_usercopy
  • Type changed from Bugs to Feature Requests

So, this is a feature request for change of default behaviour in squirrelmail_usercopy (or for a config option in this plugin) to remove/disable identities_level checks.

comment:6 in reply to: ↑ 5 Changed 3 years ago by aberglund

Replying to alec:

So, this is a feature request for change of default behaviour in squirrelmail_usercopy (or for a config option in this plugin) to remove/disable identities_level checks.

Yes. Having the option to disable the identities_level check would be perfect.

comment:7 Changed 3 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

In r3743/svn added squirrelmail_identities_level option.

Note: See TracTickets for help on using tickets.