Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-admin
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
acs-admin
Commits
00ac8462
Commit
00ac8462
authored
Apr 20, 2007
by
Malte Sussdorff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New version of acs-admin, after CVS
parent
f94bfce9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
0 deletions
+116
-0
merge-procs.tcl
tcl/merge-procs.tcl
+59
-0
merge-procs.xql
tcl/merge-procs.xql
+52
-0
packages-install-4.tcl
www/apm/packages-install-4.tcl
+5
-0
No files found.
tcl/merge-procs.tcl
0 → 100644
View file @
00ac8462
ad_library
{
Definitions of procs for the merge process
@creation-date 15 APR 2005
@author Enrique Catalan
(
quio@galileo.edu
)
@cvs-id $Id$
}
namespace
eval merge
{}
ad_proc -public merge::MergeUserInfo
{
-from_user_id:required
-to_user_id:required
}
{
Merge user info. Revokes permissions for from_user_id and grants
them to to_user_id.
@param from_user_id From user ID.
@param to_user_id To user ID.
}
{
ns_log Notice
"Running merge::MergeUserInfo"
db_transaction
{
if
{
!
[
db_0or1row to_user_portrait
{
*SQL*
}]
&&
[
db_0or1row from_user_portrait
{
*SQL*
}]
}
{
db_dml upd_portrait
{
*SQL*
}
}
# get the permissions of the from_user_id
# and grant them to the to_user_id
db_foreach getfromobjs
{
*SQL*
}
{
# revoke the permissions of from_user_id
permission::revoke -object_id
$from
_oid -party_id
$from
_user_id -privilege
$from
_priv
if
{
!
[
db_string touserhas
{
*SQL*
}
]
}
{
# grant the permissions to to_user_id
permission::grant -object_id
$from
_oid -party_id
$to
_user_id -privilege
$from
_priv
}
}
ns_log notice
" Merging acs_objects"
db_dml acs_objs_upd
{
*SQL*
}
}
ns_log Notice
"Finishing merge::MergeUserInfo"
}
ad_proc -callback merge::MergePackageUser
{
-from_user_id:required
-to_user_id:required
}
{
Merge two accounts
}
-
ad_proc -callback merge::MergeShowUserInfo
{
-user_id:required
}
{
Show information of accounts to merge
}
-
tcl/merge-procs.xql
0 → 100644
View file @
00ac8462
<?xml version="1.0"?>
<queryset>
<fullquery
name=
"merge::MergeUserInfo.to_user_portrait"
>
<querytext>
select c.item_id
from acs_rels a, cr_items c
where a.object_id_two = c.item_id
and a.object_id_one = :to_user_id
and a.rel_type = 'user_portrait_rel'
</querytext>
</fullquery>
<fullquery
name=
"merge::MergeUserInfo.from_user_portrait"
>
<querytext>
select c.item_id
from acs_rels a, cr_items c
where a.object_id_two = c.item_id
and a.object_id_one = :from_user_id
and a.rel_type = 'user_portrait_rel'
</querytext>
</fullquery>
<fullquery
name=
"merge::MergeUserInfo.upd_portrait"
>
<querytext>
update acs_rels
set object_id_one = :to_user_id
where object_id_one = :from_user_id
and rel_type = 'user_portrait_rel'
</querytext>
</fullquery>
<fullquery
name=
"merge::MergeUserInfo.getfromobjs"
>
<querytext>
select object_id as from_oid, privilege as from_priv from acs_permissions where grantee_id = :from_user_id
</querytext>
</fullquery>
<fullquery
name=
"merge::MergeUserInfo.touserhas"
>
<querytext>
select count(*) from acs_permissions where object_id = :from_oid and grantee_id = :to_user_id
</querytext>
</fullquery>
<fullquery
name=
"merge::MergeUserInfo.acs_objs_upd"
>
<querytext>
update acs_objects
set creation_user = :to_user_id
where creation_user = :from_user_id
</querytext>
</fullquery>
</queryset>
\ No newline at end of file
www/apm/packages-install-4.tcl
View file @
00ac8462
...
...
@@ -22,6 +22,7 @@ ns_write "[apm_header "Package Installation"]
<ul>
"
# We have a set of SQL files that need to be sourced at the appropriate time.
set
sql_files
[
list
]
foreach
index
$sql
_file
{
...
...
@@ -31,6 +32,7 @@ foreach index $sql_file {
set
installed_count 0
foreach
pkg_info
$pkg
_install_list
{
set spec_file
[
pkg_info_spec
$pkg
_info
]
set package_path
[
pkg_info_path
$pkg
_info
]
...
...
@@ -71,6 +73,9 @@ foreach pkg_info $pkg_install_list {
set enable_p
[
expr
[
lsearch
-exact
$pkg
_enable_list
$package
_key
]
!= -1
]
# ad_return_complaint 1 "apm_package_install -enable=$enable_p -package_path $package_path -callback apm_ns_write_callback -load_data_model -data_model_files $data_model_files -mount_path $selected_mount_path $spec_file"
set version_id
[
apm_package_install
\
-enable=$enable_p
\
-package_path
$package
_path
\
...
...
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