Project

General

Profile

Feature #6166

Add option to prevent admins from setting users passwords

Added by Yannick Warnier about 6 years ago. Updated over 3 years ago.

Status:
Needs testing
Priority:
Normal
Assignee:
-
Category:
Administration
Target version:
Start date:
27/05/2013
Due date:
% Done:

90%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

In some cases, we might not want multi-url admins to be able to set users passwords to known values.
Add an option to specify that.

Executed by BeezNest for a private institution - refs BT#6226


Related issues

Related to Chamilo LMS - Feature #6165: Add option to prevent "login as"Feature implemented26/05/2013

Actions

Associated revisions

Revision f73f5667 (diff)
Added by Yannick Warnier about 6 years ago

Developed new option to block the "set password" feature - refs #6166

History

#1

Updated by Yannick Warnier about 6 years ago

  • Status changed from Assigned to Needs testing
  • Assignee deleted (Yannick Warnier)
  • % Done changed from 0 to 90
#2

Updated by Yannick Warnier about 5 years ago

The solution: insert into settings_current(variable, type, category, selected_value, title, comment, access_url, access_url_changeable, access_url_locked) values ('admins_can_set_users_pass','radio','security','true','AdminsCanChangeUsersPassTitle','AdminsCanChangeUsersPassComment', 1, 0, 1);
insert into settings_options(variable, value, display_text) values('admins_can_set_users_pass','true','Yes'),('admins_can_set_users_pass','false','No');

in main/admin/user_edit.php:

$form->addElement('radio', 'reset_password', null, get_lang('AutoGeneratePassword'), 1);
if (api_is_global_platform_admin() or api_get_setting('admins_can_set_users_pass')==='true') {
    $group = array();
    $group[] =$form->createElement('radio', 'reset_password', null, null, 2);
    $group[] =$form->createElement('password', 'password', null, array('onkeydown' => 'javascript: password_switch_radio_button();'));
    $form->addGroup($group, 'password', null, '', false);
}

#3

Updated by Yannick Warnier about 5 years ago

This has been applied to 1.10 already.

#4

Updated by Yannick Warnier over 3 years ago

  • Target version changed from 2.0 to 3.0

Also available in: Atom PDF