Commit a25dad1a authored by Frank Bergmann's avatar Frank Bergmann

- Extended security to users with the "add_users" privilete

parent e100f178
......@@ -33,6 +33,14 @@ ad_page_contract {
set current_user_id [auth::require_login]
set page_title [lang::message::lookup "" intranet-cvs-import.Upload_Objects "Upload Objects"]
set context_bar [im_context_bar "" $page_title]
set user_is_admin_p [im_is_user_site_wide_or_intranet_admin $current_user_id]
set add_users_p [im_permission $current_user_id "add_users"]
if {!$add_users_p} {
ad_return_complaint 1 "You don't have permissions to create new user."
ad_script_abort
}
# ---------------------------------------------------------------------
# Check and open the file
......@@ -193,6 +201,7 @@ foreach csv_line_fields $values_list_of_lists {
# Group memberships
set profiles ""
set password ""
# To Do:
# group_name_1 ""
......@@ -431,6 +440,11 @@ foreach csv_line_fields $values_list_of_lists {
if {$ns_write_p} { ns_write "<li>Going to update the user's employee data\n" }
if {"" ne $password} {
if {$ns_write_p} { ns_write "<li>Going to update the user's password</li>"}
ad_change_password $user_id $password
}
###
# Assign users to profiles
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment