Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-csv-import
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-csv-import
Commits
a25dad1a
Commit
a25dad1a
authored
Sep 11, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Extended security to users with the "add_users" privilete
parent
e100f178
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
import-person.tcl
www/import-person.tcl
+14
-0
No files found.
www/import-person.tcl
View file @
a25dad1a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment