Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-cost
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-cost
Commits
caf5c6e5
Commit
caf5c6e5
authored
Jun 26, 2023
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.project-open.net/project-open/intranet-cost
parents
dd50b246
0be8a220
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
50 deletions
+80
-50
upgrade-5.1.0.0.0-5.1.0.0.1.sql
sql/postgresql/upgrade/upgrade-5.1.0.0.0-5.1.0.0.1.sql
+7
-0
intranet-cost-center-procs.tcl
tcl/intranet-cost-center-procs.tcl
+3
-11
intranet-cost-procs.tcl
tcl/intranet-cost-procs.tcl
+54
-24
new-postgresql.xql
www/cost-centers/new-postgresql.xql
+0
-13
new.tcl
www/cost-centers/new.tcl
+16
-2
No files found.
sql/postgresql/upgrade/upgrade-5.1.0.0.0-5.1.0.0.1.sql
0 → 100644
View file @
caf5c6e5
SELECT
acs_log__debug
(
'/packages/intranet-cost/sql/postgresql/upgrade/upgrade-5.1.0.0.0-5.1.0.0.1.sql'
,
''
);
-- There was en error in the creation of the im_costs_project_idx.
-- The index was there with the right name, but indexing cost_type_id.
drop
index
if
exists
im_costs_project_idx
;
create
index
im_costs_project_idx
on
im_costs
(
project_id
);
tcl/intranet-cost-center-procs.tcl
View file @
caf5c6e5
...
...
@@ -435,11 +435,7 @@ ad_proc -public im_cc_read_p {
if
{
0 ==
$user
_id
}
{
set user_id
[
ad_conn user_id
]
}
if
{
0 ==
$cost
_center_id
}
{
set cost_center_id
[
im_cost_center_company
]
}
if
{
0 !=
$cost
_type_id
}
{
set privilege
[
util_memoize
[
list
db_string priv
"
select read_privilege
from im_cost_types
where cost_type_id in (select * from im_sub_categories(
$cost
_type_id))
"
-default
""
]]
set privilege
[
util_memoize
[
list
db_string priv
"select read_privilege from im_cost_types where cost_type_id =
$cost
_type_id"
-default
""
]]
}
if
{
""
==
$privilege
}
{
set privilege
"fi_read_all"
}
...
...
@@ -471,11 +467,7 @@ ad_proc -public im_cc_write_p {
if
{
0 ==
$user
_id
}
{
set user_id
[
ad_conn user_id
]
}
if
{
0 ==
$cost
_center_id
}
{
set cost_center_id
[
im_cost_center_company
]
}
if
{
0 !=
$cost
_type_id
}
{
set privilege
[
util_memoize
[
list
db_string priv
"
select write_privilege
from im_cost_types
where cost_type_id in (select * from im_sub_categories(
$cost
_type_id))
"
-default
""
]]
set privilege
[
util_memoize
[
list
db_string priv
"select write_privilege from im_cost_types where cost_type_id =
$cost
_type_id"
-default
""
]]
}
if
{
""
==
$privilege
}
{
set privilege
"fi_write_all"
}
...
...
@@ -516,7 +508,7 @@ ad_proc -public im_cost_center_write_p_helper {
return
[
db_string cc_perms
"
select im_object_permission_p(:cost_center_id, :user_id, ct.write_privilege)
from im_cost_types ct
where ct.cost_type_id
in (select * from im_sub_categories(:cost_type_id))
where ct.cost_type_id
= :cost_type_id
"
-default
"f"
]
}
...
...
tcl/intranet-cost-procs.tcl
View file @
caf5c6e5
This diff is collapsed.
Click to expand it.
www/cost-centers/new-postgresql.xql
View file @
caf5c6e5
...
...
@@ -28,17 +28,4 @@
</querytext>
</fullquery>
<fullquery
name=
"cost_center_context_update"
>
<querytext>
update acs_objects set
context_id = :parent_id
where object_id = :cost_center_id;
</querytext>
</fullquery>
</queryset>
www/cost-centers/new.tcl
View file @
caf5c6e5
...
...
@@ -111,9 +111,16 @@ ad_form -extend -name cost_center -on_request {
ad_script_abort
}
# 2023-03-13 fraber: context_id passes permissions
# from super cost-centers down the hierarchy, so
# this update is necessary.
# 2014-02-20 fraber: Generates a strange error.
# Why was this necessary in the first place?
# db_dml cost_center_context_update
{}
db_dml cost_center_context_update
{
update acs_objects set
context_id = :parent_id
where object_id = :cost_center_id
}
im_dynfield::attribute_store
\
-object_type
"im_cost_center"
\
...
...
@@ -147,9 +154,16 @@ ad_form -extend -name cost_center -on_request {
ad_script_abort
}
# 2023-03-13 fraber: context_id passes permissions
# from super cost-centers down the hierarchy, so
# this update is necessary.
# 2014-02-20 fraber: Generates a strange error.
# Why was this necessary in the first place?
# db_dml cost_center_context_update
{}
db_dml cost_center_context_update
{
update acs_objects set
context_id = :parent_id
where object_id = :cost_center_id
}
im_dynfield::attribute_store
\
-object_type
"im_cost_center"
\
...
...
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